diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
commit | 4fb8af10d0fd09372d52966b76922b9e82bbc950 (patch) | |
tree | d240e4d40357583e3f3eb228dccf20122a5b31ed /drivers/scsi | |
parent | f44f82e8a20b98558486eb14497b2f71c78fa325 (diff) | |
parent | 64a99d2a8c3ed5c4e39f3ae1cc682aa8fd3977fc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hptiop.c | 8 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 1 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/ses.c | 18 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 2 |
6 files changed, 34 insertions, 14 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index da876d3924be..a48e4990fe12 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/hdreg.h> | ||
29 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
30 | #include <asm/io.h> | 29 | #include <asm/io.h> |
31 | #include <asm/div64.h> | 30 | #include <asm/div64.h> |
@@ -1249,6 +1248,13 @@ static struct pci_device_id hptiop_id_table[] = { | |||
1249 | { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, | 1248 | { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, |
1250 | { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, | 1249 | { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, |
1251 | { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, | 1250 | { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, |
1251 | { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1252 | { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1253 | { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1254 | { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1255 | { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1256 | { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1257 | { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1252 | { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, | 1258 | { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, |
1253 | { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, | 1259 | { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, |
1254 | { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops }, | 1260 | { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops }, |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index b40a673985aa..461331d3dc45 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -102,11 +102,10 @@ static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk) | |||
102 | mutex_lock(&idescsi_ref_mutex); | 102 | mutex_lock(&idescsi_ref_mutex); |
103 | scsi = ide_scsi_g(disk); | 103 | scsi = ide_scsi_g(disk); |
104 | if (scsi) { | 104 | if (scsi) { |
105 | scsi_host_get(scsi->host); | 105 | if (ide_device_get(scsi->drive)) |
106 | if (ide_device_get(scsi->drive)) { | ||
107 | scsi_host_put(scsi->host); | ||
108 | scsi = NULL; | 106 | scsi = NULL; |
109 | } | 107 | else |
108 | scsi_host_get(scsi->host); | ||
110 | } | 109 | } |
111 | mutex_unlock(&idescsi_ref_mutex); | 110 | mutex_unlock(&idescsi_ref_mutex); |
112 | return scsi; | 111 | return scsi; |
@@ -114,9 +113,11 @@ static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk) | |||
114 | 113 | ||
115 | static void ide_scsi_put(struct ide_scsi_obj *scsi) | 114 | static void ide_scsi_put(struct ide_scsi_obj *scsi) |
116 | { | 115 | { |
116 | ide_drive_t *drive = scsi->drive; | ||
117 | |||
117 | mutex_lock(&idescsi_ref_mutex); | 118 | mutex_lock(&idescsi_ref_mutex); |
118 | ide_device_put(scsi->drive); | ||
119 | scsi_host_put(scsi->host); | 119 | scsi_host_put(scsi->host); |
120 | ide_device_put(drive); | ||
120 | mutex_unlock(&idescsi_ref_mutex); | 121 | mutex_unlock(&idescsi_ref_mutex); |
121 | } | 122 | } |
122 | 123 | ||
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 7a4409ab30ea..a319a20ed440 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kthread.h> | 9 | #include <linux/kthread.h> |
10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
11 | #include <linux/delay.h> | ||
11 | 12 | ||
12 | static int qla24xx_vport_disable(struct fc_vport *, bool); | 13 | static int qla24xx_vport_disable(struct fc_vport *, bool); |
13 | 14 | ||
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 75a64a6cae8c..b29360ed0bdc 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -366,12 +366,14 @@ spi_transport_rd_attr(rti, "%d\n"); | |||
366 | spi_transport_rd_attr(pcomp_en, "%d\n"); | 366 | spi_transport_rd_attr(pcomp_en, "%d\n"); |
367 | spi_transport_rd_attr(hold_mcs, "%d\n"); | 367 | spi_transport_rd_attr(hold_mcs, "%d\n"); |
368 | 368 | ||
369 | /* we only care about the first child device so we return 1 */ | 369 | /* we only care about the first child device that's a real SCSI device |
370 | * so we return 1 to terminate the iteration when we find it */ | ||
370 | static int child_iter(struct device *dev, void *data) | 371 | static int child_iter(struct device *dev, void *data) |
371 | { | 372 | { |
372 | struct scsi_device *sdev = to_scsi_device(dev); | 373 | if (!scsi_is_sdev_device(dev)) |
374 | return 0; | ||
373 | 375 | ||
374 | spi_dv_device(sdev); | 376 | spi_dv_device(to_scsi_device(dev)); |
375 | return 1; | 377 | return 1; |
376 | } | 378 | } |
377 | 379 | ||
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 0fe031f003e7..1bcf3c33d7ff 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c | |||
@@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev, | |||
345 | return 0; | 345 | return 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | #define VPD_INQUIRY_SIZE 512 | 348 | #define VPD_INQUIRY_SIZE 36 |
349 | 349 | ||
350 | static void ses_match_to_enclosure(struct enclosure_device *edev, | 350 | static void ses_match_to_enclosure(struct enclosure_device *edev, |
351 | struct scsi_device *sdev) | 351 | struct scsi_device *sdev) |
352 | { | 352 | { |
353 | unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL); | 353 | unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL); |
354 | unsigned char *desc; | 354 | unsigned char *desc; |
355 | int len; | 355 | u16 vpd_len; |
356 | struct efd efd = { | 356 | struct efd efd = { |
357 | .addr = 0, | 357 | .addr = 0, |
358 | }; | 358 | }; |
@@ -372,9 +372,19 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, | |||
372 | VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) | 372 | VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) |
373 | goto free; | 373 | goto free; |
374 | 374 | ||
375 | len = (buf[2] << 8) + buf[3]; | 375 | vpd_len = (buf[2] << 8) + buf[3]; |
376 | kfree(buf); | ||
377 | buf = kmalloc(vpd_len, GFP_KERNEL); | ||
378 | if (!buf) | ||
379 | return; | ||
380 | cmd[3] = vpd_len >> 8; | ||
381 | cmd[4] = vpd_len & 0xff; | ||
382 | if (scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, | ||
383 | vpd_len, NULL, SES_TIMEOUT, SES_RETRIES)) | ||
384 | goto free; | ||
385 | |||
376 | desc = buf + 4; | 386 | desc = buf + 4; |
377 | while (desc < buf + len) { | 387 | while (desc < buf + vpd_len) { |
378 | enum scsi_protocol proto = desc[0] >> 4; | 388 | enum scsi_protocol proto = desc[0] >> 4; |
379 | u8 code_set = desc[0] & 0x0f; | 389 | u8 code_set = desc[0] & 0x0f; |
380 | u8 piv = desc[1] & 0x80; | 390 | u8 piv = desc[1] & 0x80; |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index d3b8ebb83776..3d36270a8b4d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1747,7 +1747,7 @@ st_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages, | |||
1747 | */ | 1747 | */ |
1748 | flush_dcache_page(pages[i]); | 1748 | flush_dcache_page(pages[i]); |
1749 | /* ?? Is locking needed? I don't think so */ | 1749 | /* ?? Is locking needed? I don't think so */ |
1750 | /* if (TestSetPageLocked(pages[i])) | 1750 | /* if (!trylock_page(pages[i])) |
1751 | goto out_unlock; */ | 1751 | goto out_unlock; */ |
1752 | } | 1752 | } |
1753 | 1753 | ||