diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-02 17:32:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-02 17:32:44 -0500 |
commit | 2741049e66d9698da5e0c90c849406fa3d3fc45c (patch) | |
tree | 725c927121ccfe3eaa7df3b9b8e46610805f6b15 /drivers/scsi | |
parent | 2a298a35ebe060a6f2b06b20c2a34ea188ddfd37 (diff) | |
parent | 4d5cda069b3f0a3bbc18576bc15903ed665d0295 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 28 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 6 | ||||
-rw-r--r-- | drivers/scsi/st.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 5 |
7 files changed, 31 insertions, 17 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index ab383d1f59e2..3cb68af90456 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -325,6 +325,8 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, | |||
325 | * translations ( 64/32, 128/32, 255/63 ). | 325 | * translations ( 64/32, 128/32, 255/63 ). |
326 | */ | 326 | */ |
327 | buf = scsi_bios_ptable(bdev); | 327 | buf = scsi_bios_ptable(bdev); |
328 | if (!buf) | ||
329 | return 0; | ||
328 | if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) { | 330 | if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) { |
329 | struct partition *first = (struct partition * )buf; | 331 | struct partition *first = (struct partition * )buf; |
330 | struct partition *entry = first; | 332 | struct partition *entry = first; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 31e9f40e79a2..6aab9dacdeea 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -2105,7 +2105,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2105 | scmd_id(cmd), | 2105 | scmd_id(cmd), |
2106 | scmd_channel(cmd) + 'A', | 2106 | scmd_channel(cmd) + 'A', |
2107 | CAM_LUN_WILDCARD, | 2107 | CAM_LUN_WILDCARD, |
2108 | SCB_LIST_NULL, ROLE_INITIATOR) == 0) | 2108 | SCB_LIST_NULL, ROLE_INITIATOR)) |
2109 | break; | 2109 | break; |
2110 | } | 2110 | } |
2111 | } | 2111 | } |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 7fc6454068e4..d866213f42b8 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -2169,7 +2169,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2169 | if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), | 2169 | if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), |
2170 | scmd_channel(cmd) + 'A', | 2170 | scmd_channel(cmd) + 'A', |
2171 | CAM_LUN_WILDCARD, | 2171 | CAM_LUN_WILDCARD, |
2172 | SCB_LIST_NULL, ROLE_INITIATOR) == 0) | 2172 | SCB_LIST_NULL, ROLE_INITIATOR)) |
2173 | break; | 2173 | break; |
2174 | } | 2174 | } |
2175 | } | 2175 | } |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 718a2bc4ed5e..38a53b5f9e9a 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -812,12 +812,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
812 | if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev)) | 812 | if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev)) |
813 | return; | 813 | return; |
814 | 814 | ||
815 | /* see if the device has an echo buffer. If it does we can | 815 | /* len == -1 is the signal that we need to ascertain the |
816 | * do the SPI pattern write tests */ | 816 | * presence of an echo buffer before trying to use it. len == |
817 | 817 | * 0 means we don't have an echo buffer */ | |
818 | len = 0; | 818 | len = -1; |
819 | if (scsi_device_dt(sdev)) | ||
820 | len = spi_dv_device_get_echo_buffer(sdev, buffer); | ||
821 | 819 | ||
822 | retry: | 820 | retry: |
823 | 821 | ||
@@ -840,11 +838,23 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
840 | if (spi_min_period(starget) == 8) | 838 | if (spi_min_period(starget) == 8) |
841 | DV_SET(pcomp_en, 1); | 839 | DV_SET(pcomp_en, 1); |
842 | } | 840 | } |
841 | /* Do the read only INQUIRY tests */ | ||
842 | spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, | ||
843 | spi_dv_device_compare_inquiry); | ||
844 | /* See if we actually managed to negotiate and sustain DT */ | ||
845 | if (i->f->get_dt) | ||
846 | i->f->get_dt(starget); | ||
847 | |||
848 | /* see if the device has an echo buffer. If it does we can do | ||
849 | * the SPI pattern write tests. Because of some broken | ||
850 | * devices, we *only* try this on a device that has actually | ||
851 | * negotiated DT */ | ||
852 | |||
853 | if (len == -1 && spi_dt(starget)) | ||
854 | len = spi_dv_device_get_echo_buffer(sdev, buffer); | ||
843 | 855 | ||
844 | if (len == 0) { | 856 | if (len <= 0) { |
845 | starget_printk(KERN_INFO, starget, "Domain Validation skipping write tests\n"); | 857 | starget_printk(KERN_INFO, starget, "Domain Validation skipping write tests\n"); |
846 | spi_dv_retrain(sdev, buffer, buffer + len, | ||
847 | spi_dv_device_compare_inquiry); | ||
848 | return; | 858 | return; |
849 | } | 859 | } |
850 | 860 | ||
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 72ec59456e69..b55c2a8a547c 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1860,9 +1860,11 @@ st_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages, | |||
1860 | unlock_page(pages[j]); */ | 1860 | unlock_page(pages[j]); */ |
1861 | res = 0; | 1861 | res = 0; |
1862 | out_unmap: | 1862 | out_unmap: |
1863 | if (res > 0) | 1863 | if (res > 0) { |
1864 | for (j=0; j < res; j++) | 1864 | for (j=0; j < res; j++) |
1865 | page_cache_release(pages[j]); | 1865 | page_cache_release(pages[j]); |
1866 | res = 0; | ||
1867 | } | ||
1866 | kfree(pages); | 1868 | kfree(pages); |
1867 | return res; | 1869 | return res; |
1868 | } | 1870 | } |
@@ -1878,8 +1880,6 @@ st_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_pages, | |||
1878 | for (i=0; i < nr_pages; i++) { | 1880 | for (i=0; i < nr_pages; i++) { |
1879 | struct page *page = sgl[i].page; | 1881 | struct page *page = sgl[i].page; |
1880 | 1882 | ||
1881 | /* XXX: just for debug. Remove when PageReserved is removed */ | ||
1882 | BUG_ON(PageReserved(page)); | ||
1883 | if (dirtied) | 1883 | if (dirtied) |
1884 | SetPageDirty(page); | 1884 | SetPageDirty(page); |
1885 | /* unlock_page(page); */ | 1885 | /* unlock_page(page); */ |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 770c4324f3d5..7ac6ea141fff 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4509,6 +4509,7 @@ static int sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pa | |||
4509 | if (res > 0) { | 4509 | if (res > 0) { |
4510 | for (j=0; j < res; j++) | 4510 | for (j=0; j < res; j++) |
4511 | page_cache_release(pages[j]); | 4511 | page_cache_release(pages[j]); |
4512 | res = 0; | ||
4512 | } | 4513 | } |
4513 | kfree(pages); | 4514 | kfree(pages); |
4514 | return res; | 4515 | return res; |
@@ -4524,8 +4525,6 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p | |||
4524 | for (i=0; i < nr_pages; i++) { | 4525 | for (i=0; i < nr_pages; i++) { |
4525 | struct page *page = sgl[i].page; | 4526 | struct page *page = sgl[i].page; |
4526 | 4527 | ||
4527 | /* XXX: just for debug. Remove when PageReserved is removed */ | ||
4528 | BUG_ON(PageReserved(page)); | ||
4529 | if (dirtied) | 4528 | if (dirtied) |
4530 | SetPageDirty(page); | 4529 | SetPageDirty(page); |
4531 | /* FIXME: cache flush missing for rw==READ | 4530 | /* FIXME: cache flush missing for rw==READ |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index d76766c3ce16..7fc0b97173e1 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
@@ -2086,6 +2086,7 @@ static void sym2_set_dt(struct scsi_target *starget, int dt) | |||
2086 | tp->tgoal.check_nego = 1; | 2086 | tp->tgoal.check_nego = 1; |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | #if 0 | ||
2089 | static void sym2_set_iu(struct scsi_target *starget, int iu) | 2090 | static void sym2_set_iu(struct scsi_target *starget, int iu) |
2090 | { | 2091 | { |
2091 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 2092 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); |
@@ -2111,7 +2112,7 @@ static void sym2_set_qas(struct scsi_target *starget, int qas) | |||
2111 | tp->tgoal.qas = 0; | 2112 | tp->tgoal.qas = 0; |
2112 | tp->tgoal.check_nego = 1; | 2113 | tp->tgoal.check_nego = 1; |
2113 | } | 2114 | } |
2114 | 2115 | #endif | |
2115 | 2116 | ||
2116 | static struct spi_function_template sym2_transport_functions = { | 2117 | static struct spi_function_template sym2_transport_functions = { |
2117 | .set_offset = sym2_set_offset, | 2118 | .set_offset = sym2_set_offset, |
@@ -2122,10 +2123,12 @@ static struct spi_function_template sym2_transport_functions = { | |||
2122 | .show_width = 1, | 2123 | .show_width = 1, |
2123 | .set_dt = sym2_set_dt, | 2124 | .set_dt = sym2_set_dt, |
2124 | .show_dt = 1, | 2125 | .show_dt = 1, |
2126 | #if 0 | ||
2125 | .set_iu = sym2_set_iu, | 2127 | .set_iu = sym2_set_iu, |
2126 | .show_iu = 1, | 2128 | .show_iu = 1, |
2127 | .set_qas = sym2_set_qas, | 2129 | .set_qas = sym2_set_qas, |
2128 | .show_qas = 1, | 2130 | .show_qas = 1, |
2131 | #endif | ||
2129 | .get_signalling = sym2_get_signalling, | 2132 | .get_signalling = sym2_get_signalling, |
2130 | }; | 2133 | }; |
2131 | 2134 | ||