diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 09:27:36 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:37 -0400 |
commit | 9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3 (patch) | |
tree | 576b86c3ec56dd7176285ec2d27f27ca55f77bc3 /drivers/scsi/arm | |
parent | 755f516bbb983915d6cbfb5aa592cc0a5a99fd00 (diff) |
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.
So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/arm')
-rw-r--r-- | drivers/scsi/arm/acornscsi.c | 14 | ||||
-rw-r--r-- | drivers/scsi/arm/fas216.c | 11 | ||||
-rw-r--r-- | drivers/scsi/arm/queue.c | 3 |
3 files changed, 18 insertions, 10 deletions
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 2e797a367608..d89b9b4deb3c 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c | |||
@@ -760,7 +760,8 @@ intr_ret_t acornscsi_kick(AS_Host *host) | |||
760 | SCpnt->tag = SCpnt->device->current_tag; | 760 | SCpnt->tag = SCpnt->device->current_tag; |
761 | } else | 761 | } else |
762 | #endif | 762 | #endif |
763 | set_bit(SCpnt->device->id * 8 + SCpnt->device->lun, host->busyluns); | 763 | set_bit(SCpnt->device->id * 8 + |
764 | (u8)(SCpnt->device->lun & 0x07), host->busyluns); | ||
764 | 765 | ||
765 | host->stats.removes += 1; | 766 | host->stats.removes += 1; |
766 | 767 | ||
@@ -863,7 +864,8 @@ static void acornscsi_done(AS_Host *host, struct scsi_cmnd **SCpntp, | |||
863 | if (!SCpnt->scsi_done) | 864 | if (!SCpnt->scsi_done) |
864 | panic("scsi%d.H: null scsi_done function in acornscsi_done", host->host->host_no); | 865 | panic("scsi%d.H: null scsi_done function in acornscsi_done", host->host->host_no); |
865 | 866 | ||
866 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, host->busyluns); | 867 | clear_bit(SCpnt->device->id * 8 + |
868 | (u8)(SCpnt->device->lun & 0x7), host->busyluns); | ||
867 | 869 | ||
868 | SCpnt->scsi_done(SCpnt); | 870 | SCpnt->scsi_done(SCpnt); |
869 | } else | 871 | } else |
@@ -1576,7 +1578,8 @@ void acornscsi_message(AS_Host *host) | |||
1576 | printk(KERN_NOTICE "scsi%d.%c: disabling tagged queueing\n", | 1578 | printk(KERN_NOTICE "scsi%d.%c: disabling tagged queueing\n", |
1577 | host->host->host_no, acornscsi_target(host)); | 1579 | host->host->host_no, acornscsi_target(host)); |
1578 | host->SCpnt->device->simple_tags = 0; | 1580 | host->SCpnt->device->simple_tags = 0; |
1579 | set_bit(host->SCpnt->device->id * 8 + host->SCpnt->device->lun, host->busyluns); | 1581 | set_bit(host->SCpnt->device->id * 8 + |
1582 | (u8)(host->SCpnt->device->lun & 0x7), host->busyluns); | ||
1580 | break; | 1583 | break; |
1581 | #endif | 1584 | #endif |
1582 | case EXTENDED_MESSAGE | (EXTENDED_SDTR << 8): | 1585 | case EXTENDED_MESSAGE | (EXTENDED_SDTR << 8): |
@@ -2671,7 +2674,8 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt) | |||
2671 | //#if (DEBUG & DEBUG_ABORT) | 2674 | //#if (DEBUG & DEBUG_ABORT) |
2672 | printk("clear "); | 2675 | printk("clear "); |
2673 | //#endif | 2676 | //#endif |
2674 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, host->busyluns); | 2677 | clear_bit(SCpnt->device->id * 8 + |
2678 | (u8)(SCpnt->device->lun & 0x7), host->busyluns); | ||
2675 | 2679 | ||
2676 | /* | 2680 | /* |
2677 | * We found the command, and cleared it out. Either | 2681 | * We found the command, and cleared it out. Either |
@@ -2853,7 +2857,7 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance) | |||
2853 | 2857 | ||
2854 | shost_for_each_device(scd, instance) { | 2858 | shost_for_each_device(scd, instance) { |
2855 | seq_printf(m, "Device/Lun TaggedQ Sync\n"); | 2859 | seq_printf(m, "Device/Lun TaggedQ Sync\n"); |
2856 | seq_printf(m, " %d/%d ", scd->id, scd->lun); | 2860 | seq_printf(m, " %d/%llu ", scd->id, scd->lun); |
2857 | if (scd->tagged_supported) | 2861 | if (scd->tagged_supported) |
2858 | seq_printf(m, "%3sabled(%3d) ", | 2862 | seq_printf(m, "%3sabled(%3d) ", |
2859 | scd->simple_tags ? "en" : "dis", | 2863 | scd->simple_tags ? "en" : "dis", |
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index b46a6f6c0eb3..71cfb1e504c4 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
@@ -1821,7 +1821,8 @@ static void fas216_allocate_tag(FAS216_Info *info, struct scsi_cmnd *SCpnt) | |||
1821 | SCpnt->tag = SCpnt->device->current_tag; | 1821 | SCpnt->tag = SCpnt->device->current_tag; |
1822 | } else | 1822 | } else |
1823 | #endif | 1823 | #endif |
1824 | set_bit(SCpnt->device->id * 8 + SCpnt->device->lun, info->busyluns); | 1824 | set_bit(SCpnt->device->id * 8 + |
1825 | (u8)(SCpnt->device->lun & 0x7), info->busyluns); | ||
1825 | 1826 | ||
1826 | info->stats.removes += 1; | 1827 | info->stats.removes += 1; |
1827 | switch (SCpnt->cmnd[0]) { | 1828 | switch (SCpnt->cmnd[0]) { |
@@ -2171,7 +2172,8 @@ static void fas216_done(FAS216_Info *info, unsigned int result) | |||
2171 | * status. | 2172 | * status. |
2172 | */ | 2173 | */ |
2173 | info->device[SCpnt->device->id].parity_check = 0; | 2174 | info->device[SCpnt->device->id].parity_check = 0; |
2174 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, info->busyluns); | 2175 | clear_bit(SCpnt->device->id * 8 + |
2176 | (u8)(SCpnt->device->lun & 0x7), info->busyluns); | ||
2175 | 2177 | ||
2176 | fn = (void (*)(FAS216_Info *, struct scsi_cmnd *, unsigned int))SCpnt->host_scribble; | 2178 | fn = (void (*)(FAS216_Info *, struct scsi_cmnd *, unsigned int))SCpnt->host_scribble; |
2177 | fn(info, SCpnt, result); | 2179 | fn(info, SCpnt, result); |
@@ -2398,7 +2400,8 @@ static enum res_find fas216_find_command(FAS216_Info *info, | |||
2398 | * been set. | 2400 | * been set. |
2399 | */ | 2401 | */ |
2400 | info->origSCpnt = NULL; | 2402 | info->origSCpnt = NULL; |
2401 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, info->busyluns); | 2403 | clear_bit(SCpnt->device->id * 8 + |
2404 | (u8)(SCpnt->device->lun & 0x7), info->busyluns); | ||
2402 | printk("waiting for execution "); | 2405 | printk("waiting for execution "); |
2403 | res = res_success; | 2406 | res = res_success; |
2404 | } else | 2407 | } else |
@@ -3000,7 +3003,7 @@ void fas216_print_devices(FAS216_Info *info, struct seq_file *m) | |||
3000 | 3003 | ||
3001 | shost_for_each_device(scd, info->host) { | 3004 | shost_for_each_device(scd, info->host) { |
3002 | dev = &info->device[scd->id]; | 3005 | dev = &info->device[scd->id]; |
3003 | seq_printf(m, " %d/%d ", scd->id, scd->lun); | 3006 | seq_printf(m, " %d/%llu ", scd->id, scd->lun); |
3004 | if (scd->tagged_supported) | 3007 | if (scd->tagged_supported) |
3005 | seq_printf(m, "%3sabled(%3d) ", | 3008 | seq_printf(m, "%3sabled(%3d) ", |
3006 | scd->simple_tags ? "en" : "dis", | 3009 | scd->simple_tags ? "en" : "dis", |
diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index cb11ccef54e5..3441ce3ebabf 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c | |||
@@ -167,7 +167,8 @@ struct scsi_cmnd *queue_remove_exclude(Queue_t *queue, unsigned long *exclude) | |||
167 | spin_lock_irqsave(&queue->queue_lock, flags); | 167 | spin_lock_irqsave(&queue->queue_lock, flags); |
168 | list_for_each(l, &queue->head) { | 168 | list_for_each(l, &queue->head) { |
169 | QE_t *q = list_entry(l, QE_t, list); | 169 | QE_t *q = list_entry(l, QE_t, list); |
170 | if (!test_bit(q->SCpnt->device->id * 8 + q->SCpnt->device->lun, exclude)) { | 170 | if (!test_bit(q->SCpnt->device->id * 8 + |
171 | (u8)(q->SCpnt->device->lun & 0x7), exclude)) { | ||
171 | SCpnt = __queue_remove(queue, l); | 172 | SCpnt = __queue_remove(queue, l); |
172 | break; | 173 | break; |
173 | } | 174 | } |