Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] scsi_lib.c: properly count the number of pages in scsi_req_map_sg()
[SCSI] scsi_transport_sas: make write attrs writeable
[SCSI] scsi_transport_sas; fix user_scan
[SCSI] ppa: fix for machines with highmem
[SCSI] mptspi: reset handler shouldn't be called for other bus protocols
[SCSI] Blacklist entry for HP dat changer

+32 -9
+21 -6
drivers/message/fusion/mptbase.c
··· 1605 } 1606 #endif 1607 1608 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1609 /* 1610 * mpt_do_ioc_recovery - Initialize or recover MPT adapter. ··· 1900 if ((ret == 0) && MptResetHandlers[ii]) { 1901 dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", 1902 ioc->name, ii)); 1903 - rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); 1904 handlers++; 1905 } 1906 1907 if (alt_ioc_ready && MptResetHandlers[ii]) { 1908 drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", 1909 ioc->name, ioc->alt_ioc->name, ii)); 1910 - rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); 1911 handlers++; 1912 } 1913 } ··· 3282 if (MptResetHandlers[ii]) { 3283 dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", 3284 ioc->name, ii)); 3285 - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); 3286 if (ioc->alt_ioc) { 3287 dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", 3288 ioc->name, ioc->alt_ioc->name, ii)); 3289 - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); 3290 } 3291 } 3292 } ··· 5721 if (MptResetHandlers[ii]) { 5722 dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", 5723 ioc->name, ii)); 5724 - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); 5725 if (ioc->alt_ioc) { 5726 dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", 5727 ioc->name, ioc->alt_ioc->name, ii)); 5728 - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); 5729 } 5730 } 5731 }
··· 1605 } 1606 #endif 1607 1608 + static int 1609 + mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase) 1610 + { 1611 + if ((MptDriverClass[index] == MPTSPI_DRIVER && 1612 + ioc->bus_type != SPI) || 1613 + (MptDriverClass[index] == MPTFC_DRIVER && 1614 + ioc->bus_type != FC) || 1615 + (MptDriverClass[index] == MPTSAS_DRIVER && 1616 + ioc->bus_type != SAS)) 1617 + /* make sure we only call the relevant reset handler 1618 + * for the bus */ 1619 + return 0; 1620 + return (MptResetHandlers[index])(ioc, reset_phase); 1621 + } 1622 + 1623 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1624 /* 1625 * mpt_do_ioc_recovery - Initialize or recover MPT adapter. ··· 1885 if ((ret == 0) && MptResetHandlers[ii]) { 1886 dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", 1887 ioc->name, ii)); 1888 + rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); 1889 handlers++; 1890 } 1891 1892 if (alt_ioc_ready && MptResetHandlers[ii]) { 1893 drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", 1894 ioc->name, ioc->alt_ioc->name, ii)); 1895 + rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); 1896 handlers++; 1897 } 1898 } ··· 3267 if (MptResetHandlers[ii]) { 3268 dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", 3269 ioc->name, ii)); 3270 + r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); 3271 if (ioc->alt_ioc) { 3272 dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", 3273 ioc->name, ioc->alt_ioc->name, ii)); 3274 + r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); 3275 } 3276 } 3277 } ··· 5706 if (MptResetHandlers[ii]) { 5707 dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", 5708 ioc->name, ii)); 5709 + r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); 5710 if (ioc->alt_ioc) { 5711 dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", 5712 ioc->name, ioc->alt_ioc->name, ii)); 5713 + r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); 5714 } 5715 } 5716 }
+7
drivers/scsi/ppa.c
··· 982 return -ENODEV; 983 } 984 985 static struct scsi_host_template ppa_template = { 986 .module = THIS_MODULE, 987 .proc_name = "ppa", ··· 1003 .cmd_per_lun = 1, 1004 .use_clustering = ENABLE_CLUSTERING, 1005 .can_queue = 1, 1006 }; 1007 1008 /***************************************************************************
··· 982 return -ENODEV; 983 } 984 985 + static int ppa_adjust_queue(struct scsi_device *device) 986 + { 987 + blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); 988 + return 0; 989 + } 990 + 991 static struct scsi_host_template ppa_template = { 992 .module = THIS_MODULE, 993 .proc_name = "ppa", ··· 997 .cmd_per_lun = 1, 998 .use_clustering = ENABLE_CLUSTERING, 999 .can_queue = 1, 1000 + .slave_alloc = ppa_adjust_queue, 1001 }; 1002 1003 /***************************************************************************
+1
drivers/scsi/scsi_devinfo.c
··· 165 {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, 166 {"HP", "C1557A", NULL, BLIST_FORCELUN}, 167 {"HP", "C3323-300", "4269", BLIST_NOTQ}, 168 {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, 169 {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, 170 {"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
··· 165 {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, 166 {"HP", "C1557A", NULL, BLIST_FORCELUN}, 167 {"HP", "C3323-300", "4269", BLIST_NOTQ}, 168 + {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, 169 {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, 170 {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, 171 {"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
+1 -1
drivers/scsi/scsi_lib.c
··· 367 int nsegs, unsigned bufflen, gfp_t gfp) 368 { 369 struct request_queue *q = rq->q; 370 - int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; 371 unsigned int data_len = 0, len, bytes, off; 372 struct page *page; 373 struct bio *bio = NULL;
··· 367 int nsegs, unsigned bufflen, gfp_t gfp) 368 { 369 struct request_queue *q = rq->q; 370 + int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT; 371 unsigned int data_len = 0, len, bytes, off; 372 struct page *page; 373 struct bio *bio = NULL;
+2 -2
drivers/scsi/scsi_transport_sas.c
··· 955 list_for_each_entry(rphy, &sas_host->rphy_list, list) { 956 struct sas_phy *parent = dev_to_phy(rphy->dev.parent); 957 958 - if (rphy->scsi_target_id == -1) 959 continue; 960 961 if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && ··· 978 #define SETUP_TEMPLATE(attrb, field, perm, test) \ 979 i->private_##attrb[count] = class_device_attr_##field; \ 980 i->private_##attrb[count].attr.mode = perm; \ 981 - i->private_##attrb[count].store = NULL; \ 982 i->attrb[count] = &i->private_##attrb[count]; \ 983 if (test) \ 984 count++
··· 955 list_for_each_entry(rphy, &sas_host->rphy_list, list) { 956 struct sas_phy *parent = dev_to_phy(rphy->dev.parent); 957 958 + if (rphy->identify.device_type != SAS_END_DEVICE || 959 + rphy->scsi_target_id == -1) 960 continue; 961 962 if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && ··· 977 #define SETUP_TEMPLATE(attrb, field, perm, test) \ 978 i->private_##attrb[count] = class_device_attr_##field; \ 979 i->private_##attrb[count].attr.mode = perm; \ 980 i->attrb[count] = &i->private_##attrb[count]; \ 981 if (test) \ 982 count++