diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/libata-core.c | 14 | ||||
| -rw-r--r-- | drivers/block/floppy.c | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 172e32840256..3893f9bde1e6 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -5359,10 +5359,20 @@ void ata_qc_complete(struct ata_queued_cmd *qc) | |||
| 5359 | */ | 5359 | */ |
| 5360 | int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active) | 5360 | int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active) |
| 5361 | { | 5361 | { |
| 5362 | u64 done_mask, ap_qc_active = ap->qc_active; | ||
| 5362 | int nr_done = 0; | 5363 | int nr_done = 0; |
| 5363 | u64 done_mask; | ||
| 5364 | 5364 | ||
| 5365 | done_mask = ap->qc_active ^ qc_active; | 5365 | /* |
| 5366 | * If the internal tag is set on ap->qc_active, then we care about | ||
| 5367 | * bit0 on the passed in qc_active mask. Move that bit up to match | ||
| 5368 | * the internal tag. | ||
| 5369 | */ | ||
| 5370 | if (ap_qc_active & (1ULL << ATA_TAG_INTERNAL)) { | ||
| 5371 | qc_active |= (qc_active & 0x01) << ATA_TAG_INTERNAL; | ||
| 5372 | qc_active ^= qc_active & 0x01; | ||
| 5373 | } | ||
| 5374 | |||
| 5375 | done_mask = ap_qc_active ^ qc_active; | ||
| 5366 | 5376 | ||
| 5367 | if (unlikely(done_mask & qc_active)) { | 5377 | if (unlikely(done_mask & qc_active)) { |
| 5368 | ata_port_err(ap, "illegal qc_active transition (%08llx->%08llx)\n", | 5378 | ata_port_err(ap, "illegal qc_active transition (%08llx->%08llx)\n", |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 48f622728ce6..f2b6f4da1034 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -3467,6 +3467,9 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int | |||
| 3467 | (struct floppy_struct **)&outparam); | 3467 | (struct floppy_struct **)&outparam); |
| 3468 | if (ret) | 3468 | if (ret) |
| 3469 | return ret; | 3469 | return ret; |
| 3470 | memcpy(&inparam.g, outparam, | ||
| 3471 | offsetof(struct floppy_struct, name)); | ||
| 3472 | outparam = &inparam.g; | ||
| 3470 | break; | 3473 | break; |
| 3471 | case FDMSGON: | 3474 | case FDMSGON: |
| 3472 | UDP->flags |= FTD_MSG; | 3475 | UDP->flags |= FTD_MSG; |
