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