View | Details | Raw Unified | Return to bug 38173
Collapse All | Expand All

(-)file_not_specified_in_diff (-7 / +12 lines)
Line     Link Here 
0
-- xen-4.1.4.orig/qemu/hw/fdc.c
0
++ xen-4.1.4/qemu/hw/fdc.c
 Lines 1318-1324   static uint32_t fdctrl_read_data (fdctrl Link Here 
1318
{
1318
{
1319
    fdrive_t *cur_drv;
1319
    fdrive_t *cur_drv;
1320
    uint32_t retval = 0;
1320
    uint32_t retval = 0;
1321
    int pos;
1321
    uint32_t pos;
1322
1322
1323
    cur_drv = get_cur_drv(fdctrl);
1323
    cur_drv = get_cur_drv(fdctrl);
1324
    fdctrl->dsr &= ~FD_DSR_PWRDOWN;
1324
    fdctrl->dsr &= ~FD_DSR_PWRDOWN;
 Lines 1327-1334   static uint32_t fdctrl_read_data (fdctrl Link Here 
1327
        return 0;
1327
        return 0;
1328
    }
1328
    }
1329
    pos = fdctrl->data_pos;
1329
    pos = fdctrl->data_pos;
1330
    pos %= FD_SECTOR_LEN;
1330
    if (fdctrl->msr & FD_MSR_NONDMA) {
1331
    if (fdctrl->msr & FD_MSR_NONDMA) {
1331
        pos %= FD_SECTOR_LEN;
1332
        if (pos == 0) {
1332
        if (pos == 0) {
1333
            if (fdctrl->data_pos != 0)
1333
            if (fdctrl->data_pos != 0)
1334
                if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) {
1334
                if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) {
 Lines 1673-1682   static void fdctrl_handle_option (fdctrl Link Here 
1673
static void fdctrl_handle_drive_specification_command (fdctrl_t *fdctrl, int direction)
1673
static void fdctrl_handle_drive_specification_command (fdctrl_t *fdctrl, int direction)
1674
{
1674
{
1675
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1675
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1676
    uint32_t pos;
1676
1677
1677
    if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
1678
    pos = fdctrl->data_pos - 1;
1679
    pos %= FD_SECTOR_LEN;
1680
    if (fdctrl->fifo[pos] & 0x80) {
1678
        /* Command parameters done */
1681
        /* Command parameters done */
1679
        if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) {
1682
        if (fdctrl->fifo[pos] & 0x40) {
1680
            fdctrl->fifo[0] = fdctrl->fifo[1];
1683
            fdctrl->fifo[0] = fdctrl->fifo[1];
1681
            fdctrl->fifo[2] = 0;
1684
            fdctrl->fifo[2] = 0;
1682
            fdctrl->fifo[3] = 0;
1685
            fdctrl->fifo[3] = 0;
 Lines 1771-1777   static uint8_t command_to_handler[256]; Link Here 
1771
static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value)
1774
static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value)
1772
{
1775
{
1773
    fdrive_t *cur_drv;
1776
    fdrive_t *cur_drv;
1774
    int pos;
1777
    uint32_t pos;
1775
1778
1776
    /* Reset mode */
1779
    /* Reset mode */
1777
    if (!(fdctrl->dor & FD_DOR_nRESET)) {
1780
    if (!(fdctrl->dor & FD_DOR_nRESET)) {
 Lines 1817-1823   static void fdctrl_write_data (fdctrl_t Link Here 
1817
    }
1820
    }
1818
1821
1819
    FLOPPY_DPRINTF("%s: %02x\n", __func__, value);
1822
    FLOPPY_DPRINTF("%s: %02x\n", __func__, value);
1820
    fdctrl->fifo[fdctrl->data_pos++] = value;
1823
    pos = fdctrl->data_pos++;
1824
    pos %= FD_SECTOR_LEN;
1825
    fdctrl->fifo[pos] = value;
1821
    if (fdctrl->data_pos == fdctrl->data_len) {
1826
    if (fdctrl->data_pos == fdctrl->data_len) {
1822
        /* We now have all parameters
1827
        /* We now have all parameters
1823
         * and will be able to treat the command
1828
         * and will be able to treat the command

Return to bug 38173