aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-16 19:27:08 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-16 19:27:08 -0500
commitabc71c46dc0a12ab7fddc18cfe4f4aa26808c79b (patch)
treeb0c846052b994d57d58713a0cc8da30a22baaf1c /drivers
parent30dcbf29cc6d92d70fa262e79e84011fe6913bed (diff)
parent232a347a444e687b5f8cf0f6485704db1c6024d3 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/edac_mc.c44
-rw-r--r--drivers/macintosh/via-pmu.c2
-rw-r--r--drivers/media/video/mxb.c10
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
-rw-r--r--drivers/net/chelsio/sge.c6
-rw-r--r--drivers/net/e100.c5
-rw-r--r--drivers/net/e1000/e1000_main.c8
-rw-r--r--drivers/net/tg3.c2
-rw-r--r--drivers/net/tun.c5
-rw-r--r--drivers/s390/cio/css.c3
-rw-r--r--drivers/s390/scsi/zfcp_def.h1
-rw-r--r--drivers/s390/scsi/zfcp_erp.c11
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c8
-rw-r--r--drivers/scsi/ahci.c14
-rw-r--r--drivers/scsi/pcmcia/Kconfig1
-rw-r--r--drivers/scsi/scsi_devinfo.c1
-rw-r--r--drivers/scsi/scsi_transport_fc.c2
17 files changed, 91 insertions, 34 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 262e44544dc8..9c205274c1cb 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -38,6 +38,12 @@
38 38
39#define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__ 39#define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__
40 40
41/* For now, disable the EDAC sysfs code. The sysfs interface that EDAC
42 * presents to user space needs more thought, and is likely to change
43 * substantially.
44 */
45#define DISABLE_EDAC_SYSFS
46
41#ifdef CONFIG_EDAC_DEBUG 47#ifdef CONFIG_EDAC_DEBUG
42/* Values of 0 to 4 will generate output */ 48/* Values of 0 to 4 will generate output */
43int edac_debug_level = 1; 49int edac_debug_level = 1;
@@ -47,7 +53,7 @@ EXPORT_SYMBOL(edac_debug_level);
47/* EDAC Controls, setable by module parameter, and sysfs */ 53/* EDAC Controls, setable by module parameter, and sysfs */
48static int log_ue = 1; 54static int log_ue = 1;
49static int log_ce = 1; 55static int log_ce = 1;
50static int panic_on_ue = 1; 56static int panic_on_ue;
51static int poll_msec = 1000; 57static int poll_msec = 1000;
52 58
53static int check_pci_parity = 0; /* default YES check PCI parity */ 59static int check_pci_parity = 0; /* default YES check PCI parity */
@@ -77,6 +83,8 @@ static int pci_whitelist_count ;
77 83
78/* START sysfs data and methods */ 84/* START sysfs data and methods */
79 85
86#ifndef DISABLE_EDAC_SYSFS
87
80static const char *mem_types[] = { 88static const char *mem_types[] = {
81 [MEM_EMPTY] = "Empty", 89 [MEM_EMPTY] = "Empty",
82 [MEM_RESERVED] = "Reserved", 90 [MEM_RESERVED] = "Reserved",
@@ -241,6 +249,7 @@ static struct kobj_type ktype_memctrl = {
241 .default_attrs = (struct attribute **) memctrl_attr, 249 .default_attrs = (struct attribute **) memctrl_attr,
242}; 250};
243 251
252#endif /* DISABLE_EDAC_SYSFS */
244 253
245/* Initialize the main sysfs entries for edac: 254/* Initialize the main sysfs entries for edac:
246 * /sys/devices/system/edac 255 * /sys/devices/system/edac
@@ -251,6 +260,11 @@ static struct kobj_type ktype_memctrl = {
251 * !0 FAILURE 260 * !0 FAILURE
252 */ 261 */
253static int edac_sysfs_memctrl_setup(void) 262static int edac_sysfs_memctrl_setup(void)
263#ifdef DISABLE_EDAC_SYSFS
264{
265 return 0;
266}
267#else
254{ 268{
255 int err=0; 269 int err=0;
256 270
@@ -283,6 +297,7 @@ static int edac_sysfs_memctrl_setup(void)
283 297
284 return err; 298 return err;
285} 299}
300#endif /* DISABLE_EDAC_SYSFS */
286 301
287/* 302/*
288 * MC teardown: 303 * MC teardown:
@@ -290,6 +305,7 @@ static int edac_sysfs_memctrl_setup(void)
290 */ 305 */
291static void edac_sysfs_memctrl_teardown(void) 306static void edac_sysfs_memctrl_teardown(void)
292{ 307{
308#ifndef DISABLE_EDAC_SYSFS
293 debugf0("MC: " __FILE__ ": %s()\n", __func__); 309 debugf0("MC: " __FILE__ ": %s()\n", __func__);
294 310
295 /* Unregister the MC's kobject */ 311 /* Unregister the MC's kobject */
@@ -300,8 +316,11 @@ static void edac_sysfs_memctrl_teardown(void)
300 316
301 /* Unregister the 'edac' object */ 317 /* Unregister the 'edac' object */
302 sysdev_class_unregister(&edac_class); 318 sysdev_class_unregister(&edac_class);
319#endif /* DISABLE_EDAC_SYSFS */
303} 320}
304 321
322#ifndef DISABLE_EDAC_SYSFS
323
305/* 324/*
306 * /sys/devices/system/edac/pci; 325 * /sys/devices/system/edac/pci;
307 * data structures and methods 326 * data structures and methods
@@ -554,11 +573,18 @@ static struct kobj_type ktype_edac_pci = {
554 .default_attrs = (struct attribute **) edac_pci_attr, 573 .default_attrs = (struct attribute **) edac_pci_attr,
555}; 574};
556 575
576#endif /* DISABLE_EDAC_SYSFS */
577
557/** 578/**
558 * edac_sysfs_pci_setup() 579 * edac_sysfs_pci_setup()
559 * 580 *
560 */ 581 */
561static int edac_sysfs_pci_setup(void) 582static int edac_sysfs_pci_setup(void)
583#ifdef DISABLE_EDAC_SYSFS
584{
585 return 0;
586}
587#else
562{ 588{
563 int err; 589 int err;
564 590
@@ -582,16 +608,20 @@ static int edac_sysfs_pci_setup(void)
582 } 608 }
583 return err; 609 return err;
584} 610}
585 611#endif /* DISABLE_EDAC_SYSFS */
586 612
587static void edac_sysfs_pci_teardown(void) 613static void edac_sysfs_pci_teardown(void)
588{ 614{
615#ifndef DISABLE_EDAC_SYSFS
589 debugf0("MC: " __FILE__ ": %s()\n", __func__); 616 debugf0("MC: " __FILE__ ": %s()\n", __func__);
590 617
591 kobject_unregister(&edac_pci_kobj); 618 kobject_unregister(&edac_pci_kobj);
592 kobject_put(&edac_pci_kobj); 619 kobject_put(&edac_pci_kobj);
620#endif
593} 621}
594 622
623#ifndef DISABLE_EDAC_SYSFS
624
595/* EDAC sysfs CSROW data structures and methods */ 625/* EDAC sysfs CSROW data structures and methods */
596 626
597/* Set of more detailed csrow<id> attribute show/store functions */ 627/* Set of more detailed csrow<id> attribute show/store functions */
@@ -1045,6 +1075,8 @@ static struct kobj_type ktype_mci = {
1045 .default_attrs = (struct attribute **) mci_attr, 1075 .default_attrs = (struct attribute **) mci_attr,
1046}; 1076};
1047 1077
1078#endif /* DISABLE_EDAC_SYSFS */
1079
1048#define EDAC_DEVICE_SYMLINK "device" 1080#define EDAC_DEVICE_SYMLINK "device"
1049 1081
1050/* 1082/*
@@ -1056,6 +1088,11 @@ static struct kobj_type ktype_mci = {
1056 * !0 Failure 1088 * !0 Failure
1057 */ 1089 */
1058static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) 1090static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
1091#ifdef DISABLE_EDAC_SYSFS
1092{
1093 return 0;
1094}
1095#else
1059{ 1096{
1060 int i; 1097 int i;
1061 int err; 1098 int err;
@@ -1124,12 +1161,14 @@ fail:
1124 1161
1125 return err; 1162 return err;
1126} 1163}
1164#endif /* DISABLE_EDAC_SYSFS */
1127 1165
1128/* 1166/*
1129 * remove a Memory Controller instance 1167 * remove a Memory Controller instance
1130 */ 1168 */
1131static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) 1169static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
1132{ 1170{
1171#ifndef DISABLE_EDAC_SYSFS
1133 int i; 1172 int i;
1134 1173
1135 debugf0("MC: " __FILE__ ": %s()\n", __func__); 1174 debugf0("MC: " __FILE__ ": %s()\n", __func__);
@@ -1146,6 +1185,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
1146 1185
1147 kobject_unregister(&mci->edac_mci_kobj); 1186 kobject_unregister(&mci->edac_mci_kobj);
1148 kobject_put(&mci->edac_mci_kobj); 1187 kobject_put(&mci->edac_mci_kobj);
1188#endif /* DISABLE_EDAC_SYSFS */
1149} 1189}
1150 1190
1151/* END OF sysfs data and methods */ 1191/* END OF sysfs data and methods */
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 6eb93e45fcd3..4a478eb0e27d 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off,
825 p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION); 825 p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION);
826 p += sprintf(p, "PMU firmware version : %02x\n", pmu_version); 826 p += sprintf(p, "PMU firmware version : %02x\n", pmu_version);
827 p += sprintf(p, "AC Power : %d\n", 827 p += sprintf(p, "AC Power : %d\n",
828 ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0)); 828 ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0);
829 p += sprintf(p, "Battery count : %d\n", pmu_battery_count); 829 p += sprintf(p, "Battery count : %d\n", pmu_battery_count);
830 830
831 return p - page; 831 return p - page;
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index 8416ceff524b..41715cacf926 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 mxb - v4l2 driver for the Multimedia eXtension Board 2 mxb - v4l2 driver for the Multimedia eXtension Board
3 3
4 Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de> 4 Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
5 5
6 Visit http://www.mihu.de/linux/saa7146/mxb/ 6 Visit http://www.mihu.de/linux/saa7146/mxb/
7 for further details about this card. 7 for further details about this card.
@@ -327,6 +327,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
327 struct video_decoder_init init; 327 struct video_decoder_init init;
328 struct i2c_msg msg; 328 struct i2c_msg msg;
329 struct tuner_setup tun_setup; 329 struct tuner_setup tun_setup;
330 v4l2_std_id std = V4L2_STD_PAL_BG;
330 331
331 int i = 0, err = 0; 332 int i = 0, err = 0;
332 struct tea6415c_multiplex vm; 333 struct tea6415c_multiplex vm;
@@ -361,6 +362,9 @@ static int mxb_init_done(struct saa7146_dev* dev)
361 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, 362 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY,
362 &mxb->cur_freq); 363 &mxb->cur_freq);
363 364
365 /* set a default video standard */
366 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
367
364 /* mute audio on tea6420s */ 368 /* mute audio on tea6420s */
365 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]); 369 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]);
366 mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]); 370 mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]);
@@ -921,17 +925,21 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
921 int one = 1; 925 int one = 1;
922 926
923 if(V4L2_STD_PAL_I == std->id ) { 927 if(V4L2_STD_PAL_I == std->id ) {
928 v4l2_std_id std = V4L2_STD_PAL_I;
924 DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); 929 DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n"));
925 /* set the 7146 gpio register -- I don't know what this does exactly */ 930 /* set the 7146 gpio register -- I don't know what this does exactly */
926 saa7146_write(dev, GPIO_CTRL, 0x00404050); 931 saa7146_write(dev, GPIO_CTRL, 0x00404050);
927 /* unset the 7111 gpio register -- I don't know what this does exactly */ 932 /* unset the 7111 gpio register -- I don't know what this does exactly */
928 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); 933 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero);
934 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
929 } else { 935 } else {
936 v4l2_std_id std = V4L2_STD_PAL_BG;
930 DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); 937 DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n"));
931 /* set the 7146 gpio register -- I don't know what this does exactly */ 938 /* set the 7146 gpio register -- I don't know what this does exactly */
932 saa7146_write(dev, GPIO_CTRL, 0x00404050); 939 saa7146_write(dev, GPIO_CTRL, 0x00404050);
933 /* set the 7111 gpio register -- I don't know what this does exactly */ 940 /* set the 7111 gpio register -- I don't know what this does exactly */
934 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); 941 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one);
942 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
935 } 943 }
936 return 0; 944 return 0;
937} 945}
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 155737e7483f..a19480d07888 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
178 * we're at a block boundary and need to erase the whole block. 178 * we're at a block boundary and need to erase the whole block.
179 */ 179 */
180 pageaddr = instr->addr / priv->page_size; 180 pageaddr = instr->addr / priv->page_size;
181 do_block = (pageaddr & 0x7) == 0 && instr->len <= blocksize; 181 do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
182 pageaddr = pageaddr << priv->page_offset; 182 pageaddr = pageaddr << priv->page_offset;
183 183
184 command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; 184 command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE;
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 2c5b849b7ba4..30ff8ea1a402 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1021,7 +1021,7 @@ static void restart_tx_queues(struct sge *sge)
1021 if (test_and_clear_bit(nd->if_port, 1021 if (test_and_clear_bit(nd->if_port,
1022 &sge->stopped_tx_queues) && 1022 &sge->stopped_tx_queues) &&
1023 netif_running(nd)) { 1023 netif_running(nd)) {
1024 sge->stats.cmdQ_restarted[3]++; 1024 sge->stats.cmdQ_restarted[2]++;
1025 netif_wake_queue(nd); 1025 netif_wake_queue(nd);
1026 } 1026 }
1027 } 1027 }
@@ -1350,7 +1350,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter,
1350 if (unlikely(credits < count)) { 1350 if (unlikely(credits < count)) {
1351 netif_stop_queue(dev); 1351 netif_stop_queue(dev);
1352 set_bit(dev->if_port, &sge->stopped_tx_queues); 1352 set_bit(dev->if_port, &sge->stopped_tx_queues);
1353 sge->stats.cmdQ_full[3]++; 1353 sge->stats.cmdQ_full[2]++;
1354 spin_unlock(&q->lock); 1354 spin_unlock(&q->lock);
1355 if (!netif_queue_stopped(dev)) 1355 if (!netif_queue_stopped(dev))
1356 CH_ERR("%s: Tx ring full while queue awake!\n", 1356 CH_ERR("%s: Tx ring full while queue awake!\n",
@@ -1358,7 +1358,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter,
1358 return NETDEV_TX_BUSY; 1358 return NETDEV_TX_BUSY;
1359 } 1359 }
1360 if (unlikely(credits - count < q->stop_thres)) { 1360 if (unlikely(credits - count < q->stop_thres)) {
1361 sge->stats.cmdQ_full[3]++; 1361 sge->stats.cmdQ_full[2]++;
1362 netif_stop_queue(dev); 1362 netif_stop_queue(dev);
1363 set_bit(dev->if_port, &sge->stopped_tx_queues); 1363 set_bit(dev->if_port, &sge->stopped_tx_queues);
1364 } 1364 }
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index ed13f72ef8ef..31ac001f5517 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2154,6 +2154,9 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
2154 2154
2155 msleep(10); 2155 msleep(10);
2156 2156
2157 pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr,
2158 RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
2159
2157 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), 2160 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
2158 skb->data, ETH_DATA_LEN)) 2161 skb->data, ETH_DATA_LEN))
2159 err = -EAGAIN; 2162 err = -EAGAIN;
@@ -2161,8 +2164,8 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
2161err_loopback_none: 2164err_loopback_none:
2162 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); 2165 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0);
2163 nic->loopback = lb_none; 2166 nic->loopback = lb_none;
2164 e100_hw_init(nic);
2165 e100_clean_cbs(nic); 2167 e100_clean_cbs(nic);
2168 e100_hw_reset(nic);
2166err_clean_rx: 2169err_clean_rx:
2167 e100_rx_clean_list(nic); 2170 e100_rx_clean_list(nic);
2168 return err; 2171 return err;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4400117eb6c7..f39de16e6b97 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3600,7 +3600,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
3600 e1000_rx_checksum(adapter, 3600 e1000_rx_checksum(adapter,
3601 (uint32_t)(status) | 3601 (uint32_t)(status) |
3602 ((uint32_t)(rx_desc->errors) << 24), 3602 ((uint32_t)(rx_desc->errors) << 24),
3603 rx_desc->csum, skb); 3603 le16_to_cpu(rx_desc->csum), skb);
3604 3604
3605 skb->protocol = eth_type_trans(skb, netdev); 3605 skb->protocol = eth_type_trans(skb, netdev);
3606#ifdef CONFIG_E1000_NAPI 3606#ifdef CONFIG_E1000_NAPI
@@ -3773,11 +3773,11 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
3773 3773
3774copydone: 3774copydone:
3775 e1000_rx_checksum(adapter, staterr, 3775 e1000_rx_checksum(adapter, staterr,
3776 rx_desc->wb.lower.hi_dword.csum_ip.csum, skb); 3776 le16_to_cpu(rx_desc->wb.lower.hi_dword.csum_ip.csum), skb);
3777 skb->protocol = eth_type_trans(skb, netdev); 3777 skb->protocol = eth_type_trans(skb, netdev);
3778 3778
3779 if (likely(rx_desc->wb.upper.header_status & 3779 if (likely(rx_desc->wb.upper.header_status &
3780 E1000_RXDPS_HDRSTAT_HDRSP)) 3780 cpu_to_le16(E1000_RXDPS_HDRSTAT_HDRSP)))
3781 adapter->rx_hdr_split++; 3781 adapter->rx_hdr_split++;
3782#ifdef CONFIG_E1000_NAPI 3782#ifdef CONFIG_E1000_NAPI
3783 if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) { 3783 if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) {
@@ -3799,7 +3799,7 @@ copydone:
3799 netdev->last_rx = jiffies; 3799 netdev->last_rx = jiffies;
3800 3800
3801next_desc: 3801next_desc:
3802 rx_desc->wb.middle.status_error &= ~0xFF; 3802 rx_desc->wb.middle.status_error &= cpu_to_le32(~0xFF);
3803 buffer_info->skb = NULL; 3803 buffer_info->skb = NULL;
3804 3804
3805 /* return some buffers to hardware, one at a time is too slow */ 3805 /* return some buffers to hardware, one at a time is too slow */
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 0f3798f81883..c0878f304e54 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10543,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str)
10543 strcat(str, "66MHz"); 10543 strcat(str, "66MHz");
10544 else if (clock_ctrl == 6) 10544 else if (clock_ctrl == 6)
10545 strcat(str, "100MHz"); 10545 strcat(str, "100MHz");
10546 else if (clock_ctrl == 7)
10547 strcat(str, "133MHz");
10548 } else { 10546 } else {
10549 strcpy(str, "PCI:"); 10547 strcpy(str, "PCI:");
10550 if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) 10548 if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 50b8c6754b1e..a1ed2d983740 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
249 249
250 if (align) 250 if (align)
251 skb_reserve(skb, align); 251 skb_reserve(skb, align);
252 if (memcpy_fromiovec(skb_put(skb, len), iv, len)) 252 if (memcpy_fromiovec(skb_put(skb, len), iv, len)) {
253 tun->stats.rx_dropped++;
254 kfree_skb(skb);
253 return -EFAULT; 255 return -EFAULT;
256 }
254 257
255 skb->dev = tun->dev; 258 skb->dev = tun->dev;
256 switch (tun->flags & TUN_TYPE_MASK) { 259 switch (tun->flags & TUN_TYPE_MASK) {
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 1bbf231f8aaf..3c77d65960db 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -409,6 +409,9 @@ __init_channel_subsystem(struct subchannel_id schid, void *data)
409 /* -ENXIO: no more subchannels. */ 409 /* -ENXIO: no more subchannels. */
410 case -ENXIO: 410 case -ENXIO:
411 return ret; 411 return ret;
412 /* -EIO: this subchannel set not supported. */
413 case -EIO:
414 return ret;
412 default: 415 default:
413 return 0; 416 return 0;
414 } 417 }
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 7f551d66f47f..6eba56cd89ba 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -664,6 +664,7 @@ do { \
664#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002 664#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002
665#define ZFCP_STATUS_UNIT_SHARED 0x00000004 665#define ZFCP_STATUS_UNIT_SHARED 0x00000004
666#define ZFCP_STATUS_UNIT_READONLY 0x00000008 666#define ZFCP_STATUS_UNIT_READONLY 0x00000008
667#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010
667 668
668/* FSF request status (this does not have a common part) */ 669/* FSF request status (this does not have a common part) */
669#define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000 670#define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index e3c4bdd29a60..57cb628a05aa 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -3391,10 +3391,13 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter,
3391 && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, 3391 && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY,
3392 &unit->status)) 3392 &unit->status))
3393 && !unit->device 3393 && !unit->device
3394 && port->rport) 3394 && port->rport) {
3395 scsi_add_device(port->adapter->scsi_host, 0, 3395 atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED,
3396 port->rport->scsi_target_id, 3396 &unit->status);
3397 unit->scsi_lun); 3397 scsi_scan_target(&port->rport->dev, 0,
3398 port->rport->scsi_target_id,
3399 unit->scsi_lun, 0);
3400 }
3398 zfcp_unit_put(unit); 3401 zfcp_unit_put(unit);
3399 break; 3402 break;
3400 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: 3403 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 9f6b4d7a46f3..9e6d07d7b3c8 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -68,7 +68,7 @@ struct zfcp_data zfcp_data = {
68 eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler, 68 eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler,
69 /* FIXME(openfcp): Tune */ 69 /* FIXME(openfcp): Tune */
70 can_queue: 4096, 70 can_queue: 4096,
71 this_id: 0, 71 this_id: -1,
72 /* 72 /*
73 * FIXME: 73 * FIXME:
74 * one less? can zfcp_create_sbale cope with it? 74 * one less? can zfcp_create_sbale cope with it?
@@ -183,7 +183,8 @@ zfcp_scsi_slave_alloc(struct scsi_device *sdp)
183 183
184 read_lock_irqsave(&zfcp_data.config_lock, flags); 184 read_lock_irqsave(&zfcp_data.config_lock, flags);
185 unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun); 185 unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun);
186 if (unit) { 186 if (unit && atomic_test_mask(ZFCP_STATUS_UNIT_REGISTERED,
187 &unit->status)) {
187 sdp->hostdata = unit; 188 sdp->hostdata = unit;
188 unit->device = sdp; 189 unit->device = sdp;
189 zfcp_unit_get(unit); 190 zfcp_unit_get(unit);
@@ -208,6 +209,7 @@ zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
208 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; 209 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata;
209 210
210 if (unit) { 211 if (unit) {
212 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
211 sdpnt->hostdata = NULL; 213 sdpnt->hostdata = NULL;
212 unit->device = NULL; 214 unit->device = NULL;
213 zfcp_unit_put(unit); 215 zfcp_unit_put(unit);
@@ -291,7 +293,7 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit,
291 "on port 0x%016Lx in recovery\n", 293 "on port 0x%016Lx in recovery\n",
292 zfcp_get_busid_by_unit(unit), 294 zfcp_get_busid_by_unit(unit),
293 unit->fcp_lun, unit->port->wwpn); 295 unit->fcp_lun, unit->port->wwpn);
294 retval = SCSI_MLQUEUE_DEVICE_BUSY; 296 zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT);
295 goto out; 297 goto out;
296 } 298 }
297 299
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index a800fb51168b..559ff7aae3f1 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -742,23 +742,17 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
742 struct ata_queued_cmd *qc; 742 struct ata_queued_cmd *qc;
743 qc = ata_qc_from_tag(ap, ap->active_tag); 743 qc = ata_qc_from_tag(ap, ap->active_tag);
744 if (!ahci_host_intr(ap, qc)) 744 if (!ahci_host_intr(ap, qc))
745 if (ata_ratelimit()) { 745 if (ata_ratelimit())
746 struct pci_dev *pdev = 746 dev_printk(KERN_WARNING, host_set->dev,
747 to_pci_dev(ap->host_set->dev);
748 dev_printk(KERN_WARNING, &pdev->dev,
749 "unhandled interrupt on port %u\n", 747 "unhandled interrupt on port %u\n",
750 i); 748 i);
751 }
752 749
753 VPRINTK("port %u\n", i); 750 VPRINTK("port %u\n", i);
754 } else { 751 } else {
755 VPRINTK("port %u (no irq)\n", i); 752 VPRINTK("port %u (no irq)\n", i);
756 if (ata_ratelimit()) { 753 if (ata_ratelimit())
757 struct pci_dev *pdev = 754 dev_printk(KERN_WARNING, host_set->dev,
758 to_pci_dev(ap->host_set->dev);
759 dev_printk(KERN_WARNING, &pdev->dev,
760 "interrupt on disabled port %u\n", i); 755 "interrupt on disabled port %u\n", i);
761 }
762 } 756 }
763 757
764 irq_ack |= (1 << i); 758 irq_ack |= (1 << i);
diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig
index df52190f4d94..eac8e179cfff 100644
--- a/drivers/scsi/pcmcia/Kconfig
+++ b/drivers/scsi/pcmcia/Kconfig
@@ -8,6 +8,7 @@ menu "PCMCIA SCSI adapter support"
8config PCMCIA_AHA152X 8config PCMCIA_AHA152X
9 tristate "Adaptec AHA152X PCMCIA support" 9 tristate "Adaptec AHA152X PCMCIA support"
10 depends on m && !64BIT 10 depends on m && !64BIT
11 select SCSI_SPI_ATTRS
11 help 12 help
12 Say Y here if you intend to attach this type of PCMCIA SCSI host 13 Say Y here if you intend to attach this type of PCMCIA SCSI host
13 adapter to your computer. 14 adapter to your computer.
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index f01ec0a7c506..84c3937ae8fb 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -126,6 +126,7 @@ static struct {
126 {"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN}, 126 {"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN},
127 {"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN}, 127 {"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN},
128 {"BELKIN", "USB 2 HS-CF", "1.95", BLIST_FORCELUN | BLIST_INQUIRY_36}, 128 {"BELKIN", "USB 2 HS-CF", "1.95", BLIST_FORCELUN | BLIST_INQUIRY_36},
129 {"BROWNIE", "1600U3P", NULL, BLIST_NOREPORTLUN},
129 {"CANON", "IPUBJD", NULL, BLIST_SPARSELUN}, 130 {"CANON", "IPUBJD", NULL, BLIST_SPARSELUN},
130 {"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN | BLIST_INQUIRY_36}, 131 {"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN | BLIST_INQUIRY_36},
131 {"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */ 132 {"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 929032e370db..13ea64119b73 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -223,7 +223,7 @@ static void fc_rport_terminate(struct fc_rport *rport);
223 */ 223 */
224#define FC_STARGET_NUM_ATTRS 3 224#define FC_STARGET_NUM_ATTRS 3
225#define FC_RPORT_NUM_ATTRS 9 225#define FC_RPORT_NUM_ATTRS 9
226#define FC_HOST_NUM_ATTRS 16 226#define FC_HOST_NUM_ATTRS 17
227 227
228struct fc_internal { 228struct fc_internal {
229 struct scsi_transport_template t; 229 struct scsi_transport_template t;