diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/scsi/advansys.c | 2 | ||||
-rw-r--r-- | drivers/scsi/hosts.c | 24 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 75 | ||||
-rw-r--r-- | drivers/scsi/initio.c | 8 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 9 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 14 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 4 |
9 files changed, 71 insertions, 69 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 0b243e072e4c..3e161cd66463 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -732,7 +732,7 @@ config SCSI_GDTH | |||
732 | This is a driver for RAID/SCSI Disk Array Controllers (EISA/ISA/PCI) | 732 | This is a driver for RAID/SCSI Disk Array Controllers (EISA/ISA/PCI) |
733 | manufactured by Intel Corporation/ICP vortex GmbH. It is documented | 733 | manufactured by Intel Corporation/ICP vortex GmbH. It is documented |
734 | in the kernel source in <file:drivers/scsi/gdth.c> and | 734 | in the kernel source in <file:drivers/scsi/gdth.c> and |
735 | <file:drivers/scsi/gdth.h.> | 735 | <file:drivers/scsi/gdth.h>. |
736 | 736 | ||
737 | To compile this driver as a module, choose M here: the | 737 | To compile this driver as a module, choose M here: the |
738 | module will be called gdth. | 738 | module will be called gdth. |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 492702ba6463..374ed025dc5a 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -13906,7 +13906,7 @@ static int advansys_release(struct Scsi_Host *shost) | |||
13906 | 13906 | ||
13907 | #define ASC_IOADR_TABLE_MAX_IX 11 | 13907 | #define ASC_IOADR_TABLE_MAX_IX 11 |
13908 | 13908 | ||
13909 | static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] __devinitdata = { | 13909 | static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = { |
13910 | 0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190, | 13910 | 0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190, |
13911 | 0x0210, 0x0230, 0x0250, 0x0330 | 13911 | 0x0210, 0x0230, 0x0250, 0x0330 |
13912 | }; | 13912 | }; |
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 9a10b4335e76..5ea1f986220c 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -428,6 +428,15 @@ void scsi_unregister(struct Scsi_Host *shost) | |||
428 | } | 428 | } |
429 | EXPORT_SYMBOL(scsi_unregister); | 429 | EXPORT_SYMBOL(scsi_unregister); |
430 | 430 | ||
431 | static int __scsi_host_match(struct class_device *cdev, void *data) | ||
432 | { | ||
433 | struct Scsi_Host *p; | ||
434 | unsigned short *hostnum = (unsigned short *)data; | ||
435 | |||
436 | p = class_to_shost(cdev); | ||
437 | return p->host_no == *hostnum; | ||
438 | } | ||
439 | |||
431 | /** | 440 | /** |
432 | * scsi_host_lookup - get a reference to a Scsi_Host by host no | 441 | * scsi_host_lookup - get a reference to a Scsi_Host by host no |
433 | * @hostnum: host number to locate | 442 | * @hostnum: host number to locate |
@@ -437,19 +446,12 @@ EXPORT_SYMBOL(scsi_unregister); | |||
437 | **/ | 446 | **/ |
438 | struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) | 447 | struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) |
439 | { | 448 | { |
440 | struct class *class = &shost_class; | ||
441 | struct class_device *cdev; | 449 | struct class_device *cdev; |
442 | struct Scsi_Host *shost = ERR_PTR(-ENXIO), *p; | 450 | struct Scsi_Host *shost = ERR_PTR(-ENXIO); |
443 | 451 | ||
444 | down(&class->sem); | 452 | cdev = class_find_child(&shost_class, &hostnum, __scsi_host_match); |
445 | list_for_each_entry(cdev, &class->children, node) { | 453 | if (cdev) |
446 | p = class_to_shost(cdev); | 454 | shost = scsi_host_get(class_to_shost(cdev)); |
447 | if (p->host_no == hostnum) { | ||
448 | shost = scsi_host_get(p); | ||
449 | break; | ||
450 | } | ||
451 | } | ||
452 | up(&class->sem); | ||
453 | 455 | ||
454 | return shost; | 456 | return shost; |
455 | } | 457 | } |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 9706de9d98d5..02e91893064d 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -395,14 +395,12 @@ static int idescsi_expiry(ide_drive_t *drive) | |||
395 | static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | 395 | static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) |
396 | { | 396 | { |
397 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | 397 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); |
398 | idescsi_pc_t *pc=scsi->pc; | 398 | ide_hwif_t *hwif = drive->hwif; |
399 | idescsi_pc_t *pc = scsi->pc; | ||
399 | struct request *rq = pc->rq; | 400 | struct request *rq = pc->rq; |
400 | atapi_bcount_t bcount; | ||
401 | atapi_status_t status; | ||
402 | atapi_ireason_t ireason; | ||
403 | atapi_feature_t feature; | ||
404 | |||
405 | unsigned int temp; | 401 | unsigned int temp; |
402 | u16 bcount; | ||
403 | u8 stat, ireason; | ||
406 | 404 | ||
407 | #if IDESCSI_DEBUG_LOG | 405 | #if IDESCSI_DEBUG_LOG |
408 | printk (KERN_INFO "ide-scsi: Reached idescsi_pc_intr interrupt handler\n"); | 406 | printk (KERN_INFO "ide-scsi: Reached idescsi_pc_intr interrupt handler\n"); |
@@ -425,30 +423,29 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | |||
425 | (void) HWIF(drive)->ide_dma_end(drive); | 423 | (void) HWIF(drive)->ide_dma_end(drive); |
426 | } | 424 | } |
427 | 425 | ||
428 | feature.all = 0; | ||
429 | /* Clear the interrupt */ | 426 | /* Clear the interrupt */ |
430 | status.all = HWIF(drive)->INB(IDE_STATUS_REG); | 427 | stat = drive->hwif->INB(IDE_STATUS_REG); |
431 | 428 | ||
432 | if (!status.b.drq) { | 429 | if ((stat & DRQ_STAT) == 0) { |
433 | /* No more interrupts */ | 430 | /* No more interrupts */ |
434 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) | 431 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) |
435 | printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred); | 432 | printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred); |
436 | local_irq_enable_in_hardirq(); | 433 | local_irq_enable_in_hardirq(); |
437 | if (status.b.check) | 434 | if (stat & ERR_STAT) |
438 | rq->errors++; | 435 | rq->errors++; |
439 | idescsi_end_request (drive, 1, 0); | 436 | idescsi_end_request (drive, 1, 0); |
440 | return ide_stopped; | 437 | return ide_stopped; |
441 | } | 438 | } |
442 | bcount.b.low = HWIF(drive)->INB(IDE_BCOUNTL_REG); | 439 | bcount = (hwif->INB(IDE_BCOUNTH_REG) << 8) | |
443 | bcount.b.high = HWIF(drive)->INB(IDE_BCOUNTH_REG); | 440 | hwif->INB(IDE_BCOUNTL_REG); |
444 | ireason.all = HWIF(drive)->INB(IDE_IREASON_REG); | 441 | ireason = hwif->INB(IDE_IREASON_REG); |
445 | 442 | ||
446 | if (ireason.b.cod) { | 443 | if (ireason & CD) { |
447 | printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); | 444 | printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); |
448 | return ide_do_reset (drive); | 445 | return ide_do_reset (drive); |
449 | } | 446 | } |
450 | if (ireason.b.io) { | 447 | if (ireason & IO) { |
451 | temp = pc->actually_transferred + bcount.all; | 448 | temp = pc->actually_transferred + bcount; |
452 | if (temp > pc->request_transfer) { | 449 | if (temp > pc->request_transfer) { |
453 | if (temp > pc->buffer_size) { | 450 | if (temp > pc->buffer_size) { |
454 | printk(KERN_ERR "ide-scsi: The scsi wants to " | 451 | printk(KERN_ERR "ide-scsi: The scsi wants to " |
@@ -461,11 +458,13 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | |||
461 | idescsi_input_buffers(drive, pc, temp); | 458 | idescsi_input_buffers(drive, pc, temp); |
462 | else | 459 | else |
463 | drive->hwif->atapi_input_bytes(drive, pc->current_position, temp); | 460 | drive->hwif->atapi_input_bytes(drive, pc->current_position, temp); |
464 | printk(KERN_ERR "ide-scsi: transferred %d of %d bytes\n", temp, bcount.all); | 461 | printk(KERN_ERR "ide-scsi: transferred" |
462 | " %d of %d bytes\n", | ||
463 | temp, bcount); | ||
465 | } | 464 | } |
466 | pc->actually_transferred += temp; | 465 | pc->actually_transferred += temp; |
467 | pc->current_position += temp; | 466 | pc->current_position += temp; |
468 | idescsi_discard_data(drive, bcount.all - temp); | 467 | idescsi_discard_data(drive, bcount - temp); |
469 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); | 468 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); |
470 | return ide_started; | 469 | return ide_started; |
471 | } | 470 | } |
@@ -474,22 +473,24 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | |||
474 | #endif /* IDESCSI_DEBUG_LOG */ | 473 | #endif /* IDESCSI_DEBUG_LOG */ |
475 | } | 474 | } |
476 | } | 475 | } |
477 | if (ireason.b.io) { | 476 | if (ireason & IO) { |
478 | clear_bit(PC_WRITING, &pc->flags); | 477 | clear_bit(PC_WRITING, &pc->flags); |
479 | if (pc->sg) | 478 | if (pc->sg) |
480 | idescsi_input_buffers(drive, pc, bcount.all); | 479 | idescsi_input_buffers(drive, pc, bcount); |
481 | else | 480 | else |
482 | HWIF(drive)->atapi_input_bytes(drive, pc->current_position, bcount.all); | 481 | hwif->atapi_input_bytes(drive, pc->current_position, |
482 | bcount); | ||
483 | } else { | 483 | } else { |
484 | set_bit(PC_WRITING, &pc->flags); | 484 | set_bit(PC_WRITING, &pc->flags); |
485 | if (pc->sg) | 485 | if (pc->sg) |
486 | idescsi_output_buffers (drive, pc, bcount.all); | 486 | idescsi_output_buffers(drive, pc, bcount); |
487 | else | 487 | else |
488 | HWIF(drive)->atapi_output_bytes(drive, pc->current_position, bcount.all); | 488 | hwif->atapi_output_bytes(drive, pc->current_position, |
489 | bcount); | ||
489 | } | 490 | } |
490 | /* Update the current position */ | 491 | /* Update the current position */ |
491 | pc->actually_transferred += bcount.all; | 492 | pc->actually_transferred += bcount; |
492 | pc->current_position += bcount.all; | 493 | pc->current_position += bcount; |
493 | 494 | ||
494 | /* And set the interrupt handler again */ | 495 | /* And set the interrupt handler again */ |
495 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); | 496 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); |
@@ -501,16 +502,16 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) | |||
501 | ide_hwif_t *hwif = drive->hwif; | 502 | ide_hwif_t *hwif = drive->hwif; |
502 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | 503 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); |
503 | idescsi_pc_t *pc = scsi->pc; | 504 | idescsi_pc_t *pc = scsi->pc; |
504 | atapi_ireason_t ireason; | ||
505 | ide_startstop_t startstop; | 505 | ide_startstop_t startstop; |
506 | u8 ireason; | ||
506 | 507 | ||
507 | if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) { | 508 | if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) { |
508 | printk(KERN_ERR "ide-scsi: Strange, packet command " | 509 | printk(KERN_ERR "ide-scsi: Strange, packet command " |
509 | "initiated yet DRQ isn't asserted\n"); | 510 | "initiated yet DRQ isn't asserted\n"); |
510 | return startstop; | 511 | return startstop; |
511 | } | 512 | } |
512 | ireason.all = HWIF(drive)->INB(IDE_IREASON_REG); | 513 | ireason = hwif->INB(IDE_IREASON_REG); |
513 | if (!ireason.b.cod || ireason.b.io) { | 514 | if ((ireason & CD) == 0 || (ireason & IO)) { |
514 | printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " | 515 | printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " |
515 | "issuing a packet command\n"); | 516 | "issuing a packet command\n"); |
516 | return ide_do_reset (drive); | 517 | return ide_do_reset (drive); |
@@ -573,30 +574,26 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) | |||
573 | { | 574 | { |
574 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | 575 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); |
575 | ide_hwif_t *hwif = drive->hwif; | 576 | ide_hwif_t *hwif = drive->hwif; |
576 | atapi_feature_t feature; | 577 | u16 bcount; |
577 | atapi_bcount_t bcount; | 578 | u8 dma = 0; |
578 | 579 | ||
579 | scsi->pc=pc; /* Set the current packet command */ | 580 | scsi->pc=pc; /* Set the current packet command */ |
580 | pc->actually_transferred=0; /* We haven't transferred any data yet */ | 581 | pc->actually_transferred=0; /* We haven't transferred any data yet */ |
581 | pc->current_position=pc->buffer; | 582 | pc->current_position=pc->buffer; |
582 | bcount.all = min(pc->request_transfer, 63 * 1024); /* Request to transfer the entire buffer at once */ | 583 | /* Request to transfer the entire buffer at once */ |
584 | bcount = min(pc->request_transfer, 63 * 1024); | ||
583 | 585 | ||
584 | feature.all = 0; | ||
585 | if (drive->using_dma && !idescsi_map_sg(drive, pc)) { | 586 | if (drive->using_dma && !idescsi_map_sg(drive, pc)) { |
586 | hwif->sg_mapped = 1; | 587 | hwif->sg_mapped = 1; |
587 | feature.b.dma = !hwif->dma_setup(drive); | 588 | dma = !hwif->dma_setup(drive); |
588 | hwif->sg_mapped = 0; | 589 | hwif->sg_mapped = 0; |
589 | } | 590 | } |
590 | 591 | ||
591 | SELECT_DRIVE(drive); | 592 | SELECT_DRIVE(drive); |
592 | if (IDE_CONTROL_REG) | ||
593 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | ||
594 | 593 | ||
595 | HWIF(drive)->OUTB(feature.all, IDE_FEATURE_REG); | 594 | ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK, bcount, dma); |
596 | HWIF(drive)->OUTB(bcount.b.high, IDE_BCOUNTH_REG); | ||
597 | HWIF(drive)->OUTB(bcount.b.low, IDE_BCOUNTL_REG); | ||
598 | 595 | ||
599 | if (feature.b.dma) | 596 | if (dma) |
600 | set_bit(PC_DMA_OK, &pc->flags); | 597 | set_bit(PC_DMA_OK, &pc->flags); |
601 | 598 | ||
602 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { | 599 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 01bf0189367d..a10a5c74b48d 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -823,7 +823,7 @@ static void initio_append_busy_scb(struct initio_host * host, struct scsi_ctrl_b | |||
823 | { | 823 | { |
824 | 824 | ||
825 | #if DEBUG_QUEUE | 825 | #if DEBUG_QUEUE |
826 | printk("append busy SCB %o; ", scbp); | 826 | printk("append busy SCB %p; ", scbp); |
827 | #endif | 827 | #endif |
828 | if (scbp->tagmsg) | 828 | if (scbp->tagmsg) |
829 | host->act_tags[scbp->target]++; | 829 | host->act_tags[scbp->target]++; |
@@ -2609,6 +2609,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2609 | cblk->bufptr = cpu_to_le32((u32)dma_addr); | 2609 | cblk->bufptr = cpu_to_le32((u32)dma_addr); |
2610 | cmnd->SCp.dma_handle = dma_addr; | 2610 | cmnd->SCp.dma_handle = dma_addr; |
2611 | 2611 | ||
2612 | cblk->sglen = nseg; | ||
2612 | 2613 | ||
2613 | cblk->flags |= SCF_SG; /* Turn on SG list flag */ | 2614 | cblk->flags |= SCF_SG; /* Turn on SG list flag */ |
2614 | total_len = 0; | 2615 | total_len = 0; |
@@ -2869,6 +2870,7 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2869 | host = (struct initio_host *)shost->hostdata; | 2870 | host = (struct initio_host *)shost->hostdata; |
2870 | memset(host, 0, sizeof(struct initio_host)); | 2871 | memset(host, 0, sizeof(struct initio_host)); |
2871 | host->addr = pci_resource_start(pdev, 0); | 2872 | host->addr = pci_resource_start(pdev, 0); |
2873 | host->bios_addr = bios_seg; | ||
2872 | 2874 | ||
2873 | if (!request_region(host->addr, 256, "i91u")) { | 2875 | if (!request_region(host->addr, 256, "i91u")) { |
2874 | printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr); | 2876 | printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr); |
@@ -2895,6 +2897,8 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2895 | 2897 | ||
2896 | host->pci_dev = pdev; | 2898 | host->pci_dev = pdev; |
2897 | 2899 | ||
2900 | host->semaph = 1; | ||
2901 | spin_lock_init(&host->semaph_lock); | ||
2898 | host->num_scbs = num_scb; | 2902 | host->num_scbs = num_scb; |
2899 | host->scb = scb; | 2903 | host->scb = scb; |
2900 | host->next_pending = scb; | 2904 | host->next_pending = scb; |
@@ -2911,7 +2915,7 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2911 | host->last_avail = prev; | 2915 | host->last_avail = prev; |
2912 | spin_lock_init(&host->avail_lock); | 2916 | spin_lock_init(&host->avail_lock); |
2913 | 2917 | ||
2914 | initio_init(host, phys_to_virt(bios_seg << 4)); | 2918 | initio_init(host, phys_to_virt(((u32)bios_seg << 4))); |
2915 | 2919 | ||
2916 | host->jsstatus0 = 0; | 2920 | host->jsstatus0 = 0; |
2917 | 2921 | ||
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 9018ee851a8a..73270ff892d9 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -5142,6 +5142,7 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, | |||
5142 | struct ipr_ioadl_desc *last_ioadl = NULL; | 5142 | struct ipr_ioadl_desc *last_ioadl = NULL; |
5143 | int len = qc->nbytes + qc->pad_len; | 5143 | int len = qc->nbytes + qc->pad_len; |
5144 | struct scatterlist *sg; | 5144 | struct scatterlist *sg; |
5145 | unsigned int si; | ||
5145 | 5146 | ||
5146 | if (len == 0) | 5147 | if (len == 0) |
5147 | return; | 5148 | return; |
@@ -5159,7 +5160,7 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, | |||
5159 | cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg); | 5160 | cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg); |
5160 | } | 5161 | } |
5161 | 5162 | ||
5162 | ata_for_each_sg(sg, qc) { | 5163 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
5163 | ioadl->flags_and_data_len = cpu_to_be32(ioadl_flags | sg_dma_len(sg)); | 5164 | ioadl->flags_and_data_len = cpu_to_be32(ioadl_flags | sg_dma_len(sg)); |
5164 | ioadl->address = cpu_to_be32(sg_dma_address(sg)); | 5165 | ioadl->address = cpu_to_be32(sg_dma_address(sg)); |
5165 | 5166 | ||
@@ -5222,12 +5223,12 @@ static unsigned int ipr_qc_issue(struct ata_queued_cmd *qc) | |||
5222 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; | 5223 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; |
5223 | break; | 5224 | break; |
5224 | 5225 | ||
5225 | case ATA_PROT_ATAPI: | 5226 | case ATAPI_PROT_PIO: |
5226 | case ATA_PROT_ATAPI_NODATA: | 5227 | case ATAPI_PROT_NODATA: |
5227 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; | 5228 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; |
5228 | break; | 5229 | break; |
5229 | 5230 | ||
5230 | case ATA_PROT_ATAPI_DMA: | 5231 | case ATAPI_PROT_DMA: |
5231 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; | 5232 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; |
5232 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; | 5233 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; |
5233 | break; | 5234 | break; |
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index adc47d481f97..0996f866f14c 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -158,8 +158,8 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
158 | struct Scsi_Host *host = sas_ha->core.shost; | 158 | struct Scsi_Host *host = sas_ha->core.shost; |
159 | struct sas_internal *i = to_sas_internal(host->transportt); | 159 | struct sas_internal *i = to_sas_internal(host->transportt); |
160 | struct scatterlist *sg; | 160 | struct scatterlist *sg; |
161 | unsigned int num = 0; | ||
162 | unsigned int xfer = 0; | 161 | unsigned int xfer = 0; |
162 | unsigned int si; | ||
163 | 163 | ||
164 | task = sas_alloc_task(GFP_ATOMIC); | 164 | task = sas_alloc_task(GFP_ATOMIC); |
165 | if (!task) | 165 | if (!task) |
@@ -176,22 +176,20 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
176 | 176 | ||
177 | ata_tf_to_fis(&qc->tf, 1, 0, (u8*)&task->ata_task.fis); | 177 | ata_tf_to_fis(&qc->tf, 1, 0, (u8*)&task->ata_task.fis); |
178 | task->uldd_task = qc; | 178 | task->uldd_task = qc; |
179 | if (is_atapi_taskfile(&qc->tf)) { | 179 | if (ata_is_atapi(qc->tf.protocol)) { |
180 | memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len); | 180 | memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len); |
181 | task->total_xfer_len = qc->nbytes + qc->pad_len; | 181 | task->total_xfer_len = qc->nbytes + qc->pad_len; |
182 | task->num_scatter = qc->pad_len ? qc->n_elem + 1 : qc->n_elem; | 182 | task->num_scatter = qc->pad_len ? qc->n_elem + 1 : qc->n_elem; |
183 | } else { | 183 | } else { |
184 | ata_for_each_sg(sg, qc) { | 184 | for_each_sg(qc->sg, sg, qc->n_elem, si) |
185 | num++; | ||
186 | xfer += sg->length; | 185 | xfer += sg->length; |
187 | } | ||
188 | 186 | ||
189 | task->total_xfer_len = xfer; | 187 | task->total_xfer_len = xfer; |
190 | task->num_scatter = num; | 188 | task->num_scatter = si; |
191 | } | 189 | } |
192 | 190 | ||
193 | task->data_dir = qc->dma_dir; | 191 | task->data_dir = qc->dma_dir; |
194 | task->scatter = qc->__sg; | 192 | task->scatter = qc->sg; |
195 | task->ata_task.retry_count = 1; | 193 | task->ata_task.retry_count = 1; |
196 | task->task_state_flags = SAS_TASK_STATE_PENDING; | 194 | task->task_state_flags = SAS_TASK_STATE_PENDING; |
197 | qc->lldd_task = task; | 195 | qc->lldd_task = task; |
@@ -200,7 +198,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
200 | case ATA_PROT_NCQ: | 198 | case ATA_PROT_NCQ: |
201 | task->ata_task.use_ncq = 1; | 199 | task->ata_task.use_ncq = 1; |
202 | /* fall through */ | 200 | /* fall through */ |
203 | case ATA_PROT_ATAPI_DMA: | 201 | case ATAPI_PROT_DMA: |
204 | case ATA_PROT_DMA: | 202 | case ATA_PROT_DMA: |
205 | task->ata_task.dma_xfer = 1; | 203 | task->ata_task.dma_xfer = 1; |
206 | break; | 204 | break; |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 9c0422546331..f869fba86807 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -467,7 +467,7 @@ int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd) | |||
467 | res = sas_phy_reset(phy, 1); | 467 | res = sas_phy_reset(phy, 1); |
468 | if (res) | 468 | if (res) |
469 | SAS_DPRINTK("Bus reset of %s failed 0x%x\n", | 469 | SAS_DPRINTK("Bus reset of %s failed 0x%x\n", |
470 | phy->dev.kobj.k_name, | 470 | kobject_name(&phy->dev.kobj), |
471 | res); | 471 | res); |
472 | if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE) | 472 | if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE) |
473 | return SUCCESS; | 473 | return SUCCESS; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 8d1408e18efd..aba1e6d48066 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1817,7 +1817,7 @@ probe_out: | |||
1817 | return ret; | 1817 | return ret; |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | static void __devexit | 1820 | static void |
1821 | qla2x00_remove_one(struct pci_dev *pdev) | 1821 | qla2x00_remove_one(struct pci_dev *pdev) |
1822 | { | 1822 | { |
1823 | scsi_qla_host_t *ha; | 1823 | scsi_qla_host_t *ha; |
@@ -2943,7 +2943,7 @@ static struct pci_driver qla2xxx_pci_driver = { | |||
2943 | }, | 2943 | }, |
2944 | .id_table = qla2xxx_pci_tbl, | 2944 | .id_table = qla2xxx_pci_tbl, |
2945 | .probe = qla2x00_probe_one, | 2945 | .probe = qla2x00_probe_one, |
2946 | .remove = __devexit_p(qla2x00_remove_one), | 2946 | .remove = qla2x00_remove_one, |
2947 | .err_handler = &qla2xxx_err_handler, | 2947 | .err_handler = &qla2xxx_err_handler, |
2948 | }; | 2948 | }; |
2949 | 2949 | ||