diff options
author | Paul Mackerras <paulus@samba.org> | 2006-06-12 03:53:34 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-12 03:53:34 -0400 |
commit | 7a0c58d0513c246ac5438ef4a55ce8b93395ae0e (patch) | |
tree | d18f58349ced242aa62e622e381e60933f71d451 /drivers | |
parent | 6218a761bbc27acc65248c80024875bcc06d52b1 (diff) | |
parent | 289a1e995e74734b5ec76ca8a5490058f4fecc24 (diff) |
Merge branch 'merge'
Diffstat (limited to 'drivers')
32 files changed, 256 insertions, 218 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index abbdb37a7f5f..f36db22ce1ae 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -577,6 +577,8 @@ acpi_processor_register_performance(struct acpi_processor_performance | |||
577 | return_VALUE(-EBUSY); | 577 | return_VALUE(-EBUSY); |
578 | } | 578 | } |
579 | 579 | ||
580 | WARN_ON(!performance); | ||
581 | |||
580 | pr->performance = performance; | 582 | pr->performance = performance; |
581 | 583 | ||
582 | if (acpi_processor_get_performance_info(pr)) { | 584 | if (acpi_processor_get_performance_info(pr)) { |
@@ -609,7 +611,8 @@ acpi_processor_unregister_performance(struct acpi_processor_performance | |||
609 | return_VOID; | 611 | return_VOID; |
610 | } | 612 | } |
611 | 613 | ||
612 | kfree(pr->performance->states); | 614 | if (pr->performance) |
615 | kfree(pr->performance->states); | ||
613 | pr->performance = NULL; | 616 | pr->performance = NULL; |
614 | 617 | ||
615 | acpi_cpufreq_remove_file(pr); | 618 | acpi_cpufreq_remove_file(pr); |
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index f5b01c6d498e..fb919bfb2824 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -41,9 +41,9 @@ obj-$(CONFIG_N_HDLC) += n_hdlc.o | |||
41 | obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o | 41 | obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o |
42 | obj-$(CONFIG_SX) += sx.o generic_serial.o | 42 | obj-$(CONFIG_SX) += sx.o generic_serial.o |
43 | obj-$(CONFIG_RIO) += rio/ generic_serial.o | 43 | obj-$(CONFIG_RIO) += rio/ generic_serial.o |
44 | obj-$(CONFIG_HVC_DRIVER) += hvc_console.o | ||
45 | obj-$(CONFIG_HVC_CONSOLE) += hvc_vio.o hvsi.o | 44 | obj-$(CONFIG_HVC_CONSOLE) += hvc_vio.o hvsi.o |
46 | obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o | 45 | obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o |
46 | obj-$(CONFIG_HVC_DRIVER) += hvc_console.o | ||
47 | obj-$(CONFIG_RAW_DRIVER) += raw.o | 47 | obj-$(CONFIG_RAW_DRIVER) += raw.o |
48 | obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o | 48 | obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o |
49 | obj-$(CONFIG_MMTIMER) += mmtimer.o | 49 | obj-$(CONFIG_MMTIMER) += mmtimer.o |
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index ede365d05387..b9371d5bf790 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -1384,8 +1384,10 @@ do_it_again: | |||
1384 | * longer than TTY_THRESHOLD_UNTHROTTLE in canonical mode, | 1384 | * longer than TTY_THRESHOLD_UNTHROTTLE in canonical mode, |
1385 | * we won't get any more characters. | 1385 | * we won't get any more characters. |
1386 | */ | 1386 | */ |
1387 | if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE) | 1387 | if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE) { |
1388 | n_tty_set_room(tty); | ||
1388 | check_unthrottle(tty); | 1389 | check_unthrottle(tty); |
1390 | } | ||
1389 | 1391 | ||
1390 | if (b - buf >= minimum) | 1392 | if (b - buf >= minimum) |
1391 | break; | 1393 | break; |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 128b2632512d..eab5394da666 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -149,7 +149,7 @@ struct cm4000_dev { | |||
149 | #define ZERO_DEV(dev) \ | 149 | #define ZERO_DEV(dev) \ |
150 | memset(&dev->atr_csum,0, \ | 150 | memset(&dev->atr_csum,0, \ |
151 | sizeof(struct cm4000_dev) - \ | 151 | sizeof(struct cm4000_dev) - \ |
152 | /*link*/ sizeof(struct pcmcia_device) - \ | 152 | /*link*/ sizeof(struct pcmcia_device *) - \ |
153 | /*node*/ sizeof(dev_node_t) - \ | 153 | /*node*/ sizeof(dev_node_t) - \ |
154 | /*atr*/ MAX_ATR*sizeof(char) - \ | 154 | /*atr*/ MAX_ATR*sizeof(char) - \ |
155 | /*rbuf*/ 512*sizeof(char) - \ | 155 | /*rbuf*/ 512*sizeof(char) - \ |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 8a23fb54c693..5413dc43b9f1 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -845,7 +845,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud | |||
845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, | 845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, |
846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), | 846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), |
847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); | 847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); |
848 | if (!scsi_id->status_fifo_addr) { | 848 | if (scsi_id->status_fifo_addr == ~0ULL) { |
849 | SBP2_ERR("failed to allocate status FIFO address range"); | 849 | SBP2_ERR("failed to allocate status FIFO address range"); |
850 | goto failed_alloc; | 850 | goto failed_alloc; |
851 | } | 851 | } |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index a54da42849ae..8406839b91cf 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -275,6 +275,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev, | |||
275 | spin_lock_irqsave(&priv->tx_lock, flags); | 275 | spin_lock_irqsave(&priv->tx_lock, flags); |
276 | ++priv->tx_tail; | 276 | ++priv->tx_tail; |
277 | if (netif_queue_stopped(dev) && | 277 | if (netif_queue_stopped(dev) && |
278 | test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) && | ||
278 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) | 279 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) |
279 | netif_wake_queue(dev); | 280 | netif_wake_queue(dev); |
280 | spin_unlock_irqrestore(&priv->tx_lock, flags); | 281 | spin_unlock_irqrestore(&priv->tx_lock, flags); |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 9080853fe283..a30084076ac8 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1605,6 +1605,21 @@ mpt_resume(struct pci_dev *pdev) | |||
1605 | } | 1605 | } |
1606 | #endif | 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 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. | 1625 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. |
@@ -1885,14 +1900,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
1885 | if ((ret == 0) && MptResetHandlers[ii]) { | 1900 | if ((ret == 0) && MptResetHandlers[ii]) { |
1886 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", | 1901 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", |
1887 | ioc->name, ii)); | 1902 | ioc->name, ii)); |
1888 | rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); | 1903 | rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); |
1889 | handlers++; | 1904 | handlers++; |
1890 | } | 1905 | } |
1891 | 1906 | ||
1892 | if (alt_ioc_ready && MptResetHandlers[ii]) { | 1907 | if (alt_ioc_ready && MptResetHandlers[ii]) { |
1893 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", | 1908 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", |
1894 | ioc->name, ioc->alt_ioc->name, ii)); | 1909 | ioc->name, ioc->alt_ioc->name, ii)); |
1895 | rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); | 1910 | rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); |
1896 | handlers++; | 1911 | handlers++; |
1897 | } | 1912 | } |
1898 | } | 1913 | } |
@@ -3267,11 +3282,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3267 | if (MptResetHandlers[ii]) { | 3282 | if (MptResetHandlers[ii]) { |
3268 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", | 3283 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", |
3269 | ioc->name, ii)); | 3284 | ioc->name, ii)); |
3270 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); | 3285 | r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); |
3271 | if (ioc->alt_ioc) { | 3286 | if (ioc->alt_ioc) { |
3272 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", | 3287 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", |
3273 | ioc->name, ioc->alt_ioc->name, ii)); | 3288 | ioc->name, ioc->alt_ioc->name, ii)); |
3274 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); | 3289 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); |
3275 | } | 3290 | } |
3276 | } | 3291 | } |
3277 | } | 3292 | } |
@@ -5706,11 +5721,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) | |||
5706 | if (MptResetHandlers[ii]) { | 5721 | if (MptResetHandlers[ii]) { |
5707 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", | 5722 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", |
5708 | ioc->name, ii)); | 5723 | ioc->name, ii)); |
5709 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); | 5724 | r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); |
5710 | if (ioc->alt_ioc) { | 5725 | if (ioc->alt_ioc) { |
5711 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", | 5726 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", |
5712 | ioc->name, ioc->alt_ioc->name, ii)); | 5727 | ioc->name, ioc->alt_ioc->name, ii)); |
5713 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); | 5728 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); |
5714 | } | 5729 | } |
5715 | } | 5730 | } |
5716 | } | 5731 | } |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index f2a4d382ea19..3201de053943 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -831,6 +831,7 @@ mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
831 | return rc; | 831 | return rc; |
832 | } | 832 | } |
833 | 833 | ||
834 | #ifdef CONFIG_PM | ||
834 | /* | 835 | /* |
835 | * spi module resume handler | 836 | * spi module resume handler |
836 | */ | 837 | */ |
@@ -846,6 +847,7 @@ mptspi_resume(struct pci_dev *pdev) | |||
846 | 847 | ||
847 | return rc; | 848 | return rc; |
848 | } | 849 | } |
850 | #endif | ||
849 | 851 | ||
850 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 852 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
851 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 853 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 5ea133c59afb..7bd4d85d0b42 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -55,6 +55,7 @@ struct i2o_exec_wait { | |||
55 | u32 m; /* message id */ | 55 | u32 m; /* message id */ |
56 | struct i2o_message *msg; /* pointer to the reply message */ | 56 | struct i2o_message *msg; /* pointer to the reply message */ |
57 | struct list_head list; /* node in global wait list */ | 57 | struct list_head list; /* node in global wait list */ |
58 | spinlock_t lock; /* lock before modifying */ | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | /* Work struct needed to handle LCT NOTIFY replies */ | 61 | /* Work struct needed to handle LCT NOTIFY replies */ |
@@ -87,6 +88,7 @@ static struct i2o_exec_wait *i2o_exec_wait_alloc(void) | |||
87 | return NULL; | 88 | return NULL; |
88 | 89 | ||
89 | INIT_LIST_HEAD(&wait->list); | 90 | INIT_LIST_HEAD(&wait->list); |
91 | spin_lock_init(&wait->lock); | ||
90 | 92 | ||
91 | return wait; | 93 | return wait; |
92 | }; | 94 | }; |
@@ -125,6 +127,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg, | |||
125 | DECLARE_WAIT_QUEUE_HEAD(wq); | 127 | DECLARE_WAIT_QUEUE_HEAD(wq); |
126 | struct i2o_exec_wait *wait; | 128 | struct i2o_exec_wait *wait; |
127 | static u32 tcntxt = 0x80000000; | 129 | static u32 tcntxt = 0x80000000; |
130 | long flags; | ||
128 | int rc = 0; | 131 | int rc = 0; |
129 | 132 | ||
130 | wait = i2o_exec_wait_alloc(); | 133 | wait = i2o_exec_wait_alloc(); |
@@ -146,33 +149,28 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg, | |||
146 | wait->tcntxt = tcntxt++; | 149 | wait->tcntxt = tcntxt++; |
147 | msg->u.s.tcntxt = cpu_to_le32(wait->tcntxt); | 150 | msg->u.s.tcntxt = cpu_to_le32(wait->tcntxt); |
148 | 151 | ||
152 | wait->wq = &wq; | ||
153 | /* | ||
154 | * we add elements to the head, because if a entry in the list will | ||
155 | * never be removed, we have to iterate over it every time | ||
156 | */ | ||
157 | list_add(&wait->list, &i2o_exec_wait_list); | ||
158 | |||
149 | /* | 159 | /* |
150 | * Post the message to the controller. At some point later it will | 160 | * Post the message to the controller. At some point later it will |
151 | * return. If we time out before it returns then complete will be zero. | 161 | * return. If we time out before it returns then complete will be zero. |
152 | */ | 162 | */ |
153 | i2o_msg_post(c, msg); | 163 | i2o_msg_post(c, msg); |
154 | 164 | ||
155 | if (!wait->complete) { | 165 | wait_event_interruptible_timeout(wq, wait->complete, timeout * HZ); |
156 | wait->wq = &wq; | ||
157 | /* | ||
158 | * we add elements add the head, because if a entry in the list | ||
159 | * will never be removed, we have to iterate over it every time | ||
160 | */ | ||
161 | list_add(&wait->list, &i2o_exec_wait_list); | ||
162 | |||
163 | wait_event_interruptible_timeout(wq, wait->complete, | ||
164 | timeout * HZ); | ||
165 | 166 | ||
166 | wait->wq = NULL; | 167 | spin_lock_irqsave(&wait->lock, flags); |
167 | } | ||
168 | 168 | ||
169 | barrier(); | 169 | wait->wq = NULL; |
170 | 170 | ||
171 | if (wait->complete) { | 171 | if (wait->complete) |
172 | rc = le32_to_cpu(wait->msg->body[0]) >> 24; | 172 | rc = le32_to_cpu(wait->msg->body[0]) >> 24; |
173 | i2o_flush_reply(c, wait->m); | 173 | else { |
174 | i2o_exec_wait_free(wait); | ||
175 | } else { | ||
176 | /* | 174 | /* |
177 | * We cannot remove it now. This is important. When it does | 175 | * We cannot remove it now. This is important. When it does |
178 | * terminate (which it must do if the controller has not | 176 | * terminate (which it must do if the controller has not |
@@ -186,6 +184,13 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg, | |||
186 | rc = -ETIMEDOUT; | 184 | rc = -ETIMEDOUT; |
187 | } | 185 | } |
188 | 186 | ||
187 | spin_unlock_irqrestore(&wait->lock, flags); | ||
188 | |||
189 | if (rc != -ETIMEDOUT) { | ||
190 | i2o_flush_reply(c, wait->m); | ||
191 | i2o_exec_wait_free(wait); | ||
192 | } | ||
193 | |||
189 | return rc; | 194 | return rc; |
190 | }; | 195 | }; |
191 | 196 | ||
@@ -213,7 +218,6 @@ static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m, | |||
213 | { | 218 | { |
214 | struct i2o_exec_wait *wait, *tmp; | 219 | struct i2o_exec_wait *wait, *tmp; |
215 | unsigned long flags; | 220 | unsigned long flags; |
216 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | ||
217 | int rc = 1; | 221 | int rc = 1; |
218 | 222 | ||
219 | /* | 223 | /* |
@@ -223,23 +227,24 @@ static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m, | |||
223 | * already expired. Not much we can do about that except log it for | 227 | * already expired. Not much we can do about that except log it for |
224 | * debug purposes, increase timeout, and recompile. | 228 | * debug purposes, increase timeout, and recompile. |
225 | */ | 229 | */ |
226 | spin_lock_irqsave(&lock, flags); | ||
227 | list_for_each_entry_safe(wait, tmp, &i2o_exec_wait_list, list) { | 230 | list_for_each_entry_safe(wait, tmp, &i2o_exec_wait_list, list) { |
228 | if (wait->tcntxt == context) { | 231 | if (wait->tcntxt == context) { |
229 | list_del(&wait->list); | 232 | spin_lock_irqsave(&wait->lock, flags); |
230 | 233 | ||
231 | spin_unlock_irqrestore(&lock, flags); | 234 | list_del(&wait->list); |
232 | 235 | ||
233 | wait->m = m; | 236 | wait->m = m; |
234 | wait->msg = msg; | 237 | wait->msg = msg; |
235 | wait->complete = 1; | 238 | wait->complete = 1; |
236 | 239 | ||
237 | barrier(); | 240 | if (wait->wq) |
238 | |||
239 | if (wait->wq) { | ||
240 | wake_up_interruptible(wait->wq); | ||
241 | rc = 0; | 241 | rc = 0; |
242 | } else { | 242 | else |
243 | rc = -1; | ||
244 | |||
245 | spin_unlock_irqrestore(&wait->lock, flags); | ||
246 | |||
247 | if (rc) { | ||
243 | struct device *dev; | 248 | struct device *dev; |
244 | 249 | ||
245 | dev = &c->pdev->dev; | 250 | dev = &c->pdev->dev; |
@@ -248,15 +253,13 @@ static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m, | |||
248 | c->name); | 253 | c->name); |
249 | i2o_dma_free(dev, &wait->dma); | 254 | i2o_dma_free(dev, &wait->dma); |
250 | i2o_exec_wait_free(wait); | 255 | i2o_exec_wait_free(wait); |
251 | rc = -1; | 256 | } else |
252 | } | 257 | wake_up_interruptible(wait->wq); |
253 | 258 | ||
254 | return rc; | 259 | return rc; |
255 | } | 260 | } |
256 | } | 261 | } |
257 | 262 | ||
258 | spin_unlock_irqrestore(&lock, flags); | ||
259 | |||
260 | osm_warn("%s: Bogus reply in POST WAIT (tr-context: %08x)!\n", c->name, | 263 | osm_warn("%s: Bogus reply in POST WAIT (tr-context: %08x)!\n", c->name, |
261 | context); | 264 | context); |
262 | 265 | ||
@@ -322,14 +325,9 @@ static DEVICE_ATTR(product_id, S_IRUGO, i2o_exec_show_product_id, NULL); | |||
322 | static int i2o_exec_probe(struct device *dev) | 325 | static int i2o_exec_probe(struct device *dev) |
323 | { | 326 | { |
324 | struct i2o_device *i2o_dev = to_i2o_device(dev); | 327 | struct i2o_device *i2o_dev = to_i2o_device(dev); |
325 | struct i2o_controller *c = i2o_dev->iop; | ||
326 | 328 | ||
327 | i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff); | 329 | i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff); |
328 | 330 | ||
329 | c->exec = i2o_dev; | ||
330 | |||
331 | i2o_exec_lct_notify(c, c->lct->change_ind + 1); | ||
332 | |||
333 | device_create_file(dev, &dev_attr_vendor_id); | 331 | device_create_file(dev, &dev_attr_vendor_id); |
334 | device_create_file(dev, &dev_attr_product_id); | 332 | device_create_file(dev, &dev_attr_product_id); |
335 | 333 | ||
@@ -523,6 +521,8 @@ static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) | |||
523 | struct device *dev; | 521 | struct device *dev; |
524 | struct i2o_message *msg; | 522 | struct i2o_message *msg; |
525 | 523 | ||
524 | down(&c->lct_lock); | ||
525 | |||
526 | dev = &c->pdev->dev; | 526 | dev = &c->pdev->dev; |
527 | 527 | ||
528 | if (i2o_dma_realloc | 528 | if (i2o_dma_realloc |
@@ -545,6 +545,8 @@ static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) | |||
545 | 545 | ||
546 | i2o_msg_post(c, msg); | 546 | i2o_msg_post(c, msg); |
547 | 547 | ||
548 | up(&c->lct_lock); | ||
549 | |||
548 | return 0; | 550 | return 0; |
549 | }; | 551 | }; |
550 | 552 | ||
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index 492167446936..febbdd4e0605 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c | |||
@@ -804,8 +804,6 @@ void i2o_iop_remove(struct i2o_controller *c) | |||
804 | 804 | ||
805 | /* Ask the IOP to switch to RESET state */ | 805 | /* Ask the IOP to switch to RESET state */ |
806 | i2o_iop_reset(c); | 806 | i2o_iop_reset(c); |
807 | |||
808 | put_device(&c->device); | ||
809 | } | 807 | } |
810 | 808 | ||
811 | /** | 809 | /** |
@@ -1059,7 +1057,7 @@ struct i2o_controller *i2o_iop_alloc(void) | |||
1059 | 1057 | ||
1060 | snprintf(poolname, sizeof(poolname), "i2o_%s_msg_inpool", c->name); | 1058 | snprintf(poolname, sizeof(poolname), "i2o_%s_msg_inpool", c->name); |
1061 | if (i2o_pool_alloc | 1059 | if (i2o_pool_alloc |
1062 | (&c->in_msg, poolname, I2O_INBOUND_MSG_FRAME_SIZE * 4, | 1060 | (&c->in_msg, poolname, I2O_INBOUND_MSG_FRAME_SIZE * 4 + sizeof(u32), |
1063 | I2O_MSG_INPOOL_MIN)) { | 1061 | I2O_MSG_INPOOL_MIN)) { |
1064 | kfree(c); | 1062 | kfree(c); |
1065 | return ERR_PTR(-ENOMEM); | 1063 | return ERR_PTR(-ENOMEM); |
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 003b077c2324..45bcf098e762 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig | |||
@@ -84,7 +84,7 @@ config MMC_WBSD | |||
84 | 84 | ||
85 | config MMC_AU1X | 85 | config MMC_AU1X |
86 | tristate "Alchemy AU1XX0 MMC Card Interface support" | 86 | tristate "Alchemy AU1XX0 MMC Card Interface support" |
87 | depends on SOC_AU1X00 && MMC | 87 | depends on MMC && SOC_AU1200 |
88 | help | 88 | help |
89 | This selects the AMD Alchemy(R) Multimedia card interface. | 89 | This selects the AMD Alchemy(R) Multimedia card interface. |
90 | If you have a Alchemy platform with a MMC slot, say Y or M here. | 90 | If you have a Alchemy platform with a MMC slot, say Y or M here. |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index ecccca35c6f4..d1c705b412c2 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -870,13 +870,16 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
870 | *data = 0; | 870 | *data = 0; |
871 | 871 | ||
872 | /* Hook up test interrupt handler just for this test */ | 872 | /* Hook up test interrupt handler just for this test */ |
873 | if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) { | 873 | if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name, |
874 | netdev)) { | ||
874 | shared_int = FALSE; | 875 | shared_int = FALSE; |
875 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, | 876 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, |
876 | netdev->name, netdev)){ | 877 | netdev->name, netdev)){ |
877 | *data = 1; | 878 | *data = 1; |
878 | return -1; | 879 | return -1; |
879 | } | 880 | } |
881 | DPRINTK(PROBE,INFO, "testing %s interrupt\n", | ||
882 | (shared_int ? "shared" : "unshared")); | ||
880 | 883 | ||
881 | /* Disable all the interrupts */ | 884 | /* Disable all the interrupts */ |
882 | E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF); | 885 | E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF); |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index ed15fcaedaf9..97e71a4fe8eb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3519,7 +3519,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3519 | buffer_info = &rx_ring->buffer_info[i]; | 3519 | buffer_info = &rx_ring->buffer_info[i]; |
3520 | 3520 | ||
3521 | while (rx_desc->status & E1000_RXD_STAT_DD) { | 3521 | while (rx_desc->status & E1000_RXD_STAT_DD) { |
3522 | struct sk_buff *skb, *next_skb; | 3522 | struct sk_buff *skb; |
3523 | u8 status; | 3523 | u8 status; |
3524 | #ifdef CONFIG_E1000_NAPI | 3524 | #ifdef CONFIG_E1000_NAPI |
3525 | if (*work_done >= work_to_do) | 3525 | if (*work_done >= work_to_do) |
@@ -3537,8 +3537,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3537 | prefetch(next_rxd); | 3537 | prefetch(next_rxd); |
3538 | 3538 | ||
3539 | next_buffer = &rx_ring->buffer_info[i]; | 3539 | next_buffer = &rx_ring->buffer_info[i]; |
3540 | next_skb = next_buffer->skb; | ||
3541 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
3542 | 3540 | ||
3543 | cleaned = TRUE; | 3541 | cleaned = TRUE; |
3544 | cleaned_count++; | 3542 | cleaned_count++; |
@@ -3668,7 +3666,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3668 | struct e1000_buffer *buffer_info, *next_buffer; | 3666 | struct e1000_buffer *buffer_info, *next_buffer; |
3669 | struct e1000_ps_page *ps_page; | 3667 | struct e1000_ps_page *ps_page; |
3670 | struct e1000_ps_page_dma *ps_page_dma; | 3668 | struct e1000_ps_page_dma *ps_page_dma; |
3671 | struct sk_buff *skb, *next_skb; | 3669 | struct sk_buff *skb; |
3672 | unsigned int i, j; | 3670 | unsigned int i, j; |
3673 | uint32_t length, staterr; | 3671 | uint32_t length, staterr; |
3674 | int cleaned_count = 0; | 3672 | int cleaned_count = 0; |
@@ -3697,8 +3695,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3697 | prefetch(next_rxd); | 3695 | prefetch(next_rxd); |
3698 | 3696 | ||
3699 | next_buffer = &rx_ring->buffer_info[i]; | 3697 | next_buffer = &rx_ring->buffer_info[i]; |
3700 | next_skb = next_buffer->skb; | ||
3701 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
3702 | 3698 | ||
3703 | cleaned = TRUE; | 3699 | cleaned = TRUE; |
3704 | cleaned_count++; | 3700 | cleaned_count++; |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 705e1229d89d..feb5b223cd60 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2615,6 +2615,18 @@ static int nv_nway_reset(struct net_device *dev) | |||
2615 | return ret; | 2615 | return ret; |
2616 | } | 2616 | } |
2617 | 2617 | ||
2618 | #ifdef NETIF_F_TSO | ||
2619 | static int nv_set_tso(struct net_device *dev, u32 value) | ||
2620 | { | ||
2621 | struct fe_priv *np = netdev_priv(dev); | ||
2622 | |||
2623 | if ((np->driver_data & DEV_HAS_CHECKSUM)) | ||
2624 | return ethtool_op_set_tso(dev, value); | ||
2625 | else | ||
2626 | return value ? -EOPNOTSUPP : 0; | ||
2627 | } | ||
2628 | #endif | ||
2629 | |||
2618 | static struct ethtool_ops ops = { | 2630 | static struct ethtool_ops ops = { |
2619 | .get_drvinfo = nv_get_drvinfo, | 2631 | .get_drvinfo = nv_get_drvinfo, |
2620 | .get_link = ethtool_op_get_link, | 2632 | .get_link = ethtool_op_get_link, |
@@ -2626,6 +2638,10 @@ static struct ethtool_ops ops = { | |||
2626 | .get_regs = nv_get_regs, | 2638 | .get_regs = nv_get_regs, |
2627 | .nway_reset = nv_nway_reset, | 2639 | .nway_reset = nv_nway_reset, |
2628 | .get_perm_addr = ethtool_op_get_perm_addr, | 2640 | .get_perm_addr = ethtool_op_get_perm_addr, |
2641 | #ifdef NETIF_F_TSO | ||
2642 | .get_tso = ethtool_op_get_tso, | ||
2643 | .set_tso = nv_set_tso | ||
2644 | #endif | ||
2629 | }; | 2645 | }; |
2630 | 2646 | ||
2631 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | 2647 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 66e74f740261..bf58db29e2ed 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -107,7 +107,7 @@ static int init_netconsole(void) | |||
107 | 107 | ||
108 | if(!configured) { | 108 | if(!configured) { |
109 | printk("netconsole: not configured, aborting\n"); | 109 | printk("netconsole: not configured, aborting\n"); |
110 | return -EINVAL; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | if(netpoll_setup(&np)) | 113 | if(netpoll_setup(&np)) |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 4260c2128f47..a8f6bfc96fd2 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1204 | 1204 | ||
1205 | dev->last_rx = jiffies; | 1205 | dev->last_rx = jiffies; |
1206 | lp->linux_stats.rx_packets++; | 1206 | lp->linux_stats.rx_packets++; |
1207 | lp->linux_stats.rx_bytes += skb->len; | 1207 | lp->linux_stats.rx_bytes += pkt_len; |
1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ | 1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ |
1209 | continue; | 1209 | continue; |
1210 | } else { | 1210 | } else { |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 475dc930380f..0d101a18026a 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) | |||
861 | * give dev_queue_xmit something it can free. | 861 | * give dev_queue_xmit something it can free. |
862 | */ | 862 | */ |
863 | skb2 = skb_clone(skb, GFP_ATOMIC); | 863 | skb2 = skb_clone(skb, GFP_ATOMIC); |
864 | |||
865 | if (skb2 == NULL) | ||
866 | goto abort; | ||
864 | } | 867 | } |
865 | 868 | ||
866 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); | 869 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 49ad60b72657..862c226dbbe2 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -69,8 +69,8 @@ | |||
69 | 69 | ||
70 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 71 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.58" | 72 | #define DRV_MODULE_VERSION "3.59" |
73 | #define DRV_MODULE_RELDATE "May 22, 2006" | 73 | #define DRV_MODULE_RELDATE "June 8, 2006" |
74 | 74 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 75 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 76 | #define TG3_DEF_RX_MODE 0 |
@@ -4485,9 +4485,8 @@ static void tg3_disable_nvram_access(struct tg3 *tp) | |||
4485 | /* tp->lock is held. */ | 4485 | /* tp->lock is held. */ |
4486 | static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind) | 4486 | static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind) |
4487 | { | 4487 | { |
4488 | if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) | 4488 | tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, |
4489 | tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, | 4489 | NIC_SRAM_FIRMWARE_MBOX_MAGIC1); |
4490 | NIC_SRAM_FIRMWARE_MBOX_MAGIC1); | ||
4491 | 4490 | ||
4492 | if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) { | 4491 | if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) { |
4493 | switch (kind) { | 4492 | switch (kind) { |
@@ -4568,13 +4567,12 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4568 | void (*write_op)(struct tg3 *, u32, u32); | 4567 | void (*write_op)(struct tg3 *, u32, u32); |
4569 | int i; | 4568 | int i; |
4570 | 4569 | ||
4571 | if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { | 4570 | tg3_nvram_lock(tp); |
4572 | tg3_nvram_lock(tp); | 4571 | |
4573 | /* No matching tg3_nvram_unlock() after this because | 4572 | /* No matching tg3_nvram_unlock() after this because |
4574 | * chip reset below will undo the nvram lock. | 4573 | * chip reset below will undo the nvram lock. |
4575 | */ | 4574 | */ |
4576 | tp->nvram_lock_cnt = 0; | 4575 | tp->nvram_lock_cnt = 0; |
4577 | } | ||
4578 | 4576 | ||
4579 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | 4577 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || |
4580 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || | 4578 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
@@ -4727,20 +4725,25 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4727 | tw32_f(MAC_MODE, 0); | 4725 | tw32_f(MAC_MODE, 0); |
4728 | udelay(40); | 4726 | udelay(40); |
4729 | 4727 | ||
4730 | if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { | 4728 | /* Wait for firmware initialization to complete. */ |
4731 | /* Wait for firmware initialization to complete. */ | 4729 | for (i = 0; i < 100000; i++) { |
4732 | for (i = 0; i < 100000; i++) { | 4730 | tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); |
4733 | tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); | 4731 | if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) |
4734 | if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) | 4732 | break; |
4735 | break; | 4733 | udelay(10); |
4736 | udelay(10); | 4734 | } |
4737 | } | 4735 | |
4738 | if (i >= 100000) { | 4736 | /* Chip might not be fitted with firmare. Some Sun onboard |
4739 | printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, " | 4737 | * parts are configured like that. So don't signal the timeout |
4740 | "firmware will not restart magic=%08x\n", | 4738 | * of the above loop as an error, but do report the lack of |
4741 | tp->dev->name, val); | 4739 | * running firmware once. |
4742 | return -ENODEV; | 4740 | */ |
4743 | } | 4741 | if (i >= 100000 && |
4742 | !(tp->tg3_flags2 & TG3_FLG2_NO_FWARE_REPORTED)) { | ||
4743 | tp->tg3_flags2 |= TG3_FLG2_NO_FWARE_REPORTED; | ||
4744 | |||
4745 | printk(KERN_INFO PFX "%s: No firmware running.\n", | ||
4746 | tp->dev->name); | ||
4744 | } | 4747 | } |
4745 | 4748 | ||
4746 | if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && | 4749 | if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && |
@@ -9075,9 +9078,6 @@ static void __devinit tg3_nvram_init(struct tg3 *tp) | |||
9075 | { | 9078 | { |
9076 | int j; | 9079 | int j; |
9077 | 9080 | ||
9078 | if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) | ||
9079 | return; | ||
9080 | |||
9081 | tw32_f(GRC_EEPROM_ADDR, | 9081 | tw32_f(GRC_EEPROM_ADDR, |
9082 | (EEPROM_ADDR_FSM_RESET | | 9082 | (EEPROM_ADDR_FSM_RESET | |
9083 | (EEPROM_DEFAULT_CLOCK_PERIOD << | 9083 | (EEPROM_DEFAULT_CLOCK_PERIOD << |
@@ -9210,11 +9210,6 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val) | |||
9210 | { | 9210 | { |
9211 | int ret; | 9211 | int ret; |
9212 | 9212 | ||
9213 | if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) { | ||
9214 | printk(KERN_ERR PFX "Attempt to do nvram_read on Sun 570X\n"); | ||
9215 | return -EINVAL; | ||
9216 | } | ||
9217 | |||
9218 | if (!(tp->tg3_flags & TG3_FLAG_NVRAM)) | 9213 | if (!(tp->tg3_flags & TG3_FLAG_NVRAM)) |
9219 | return tg3_nvram_read_using_eeprom(tp, offset, val); | 9214 | return tg3_nvram_read_using_eeprom(tp, offset, val); |
9220 | 9215 | ||
@@ -9447,11 +9442,6 @@ static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf) | |||
9447 | { | 9442 | { |
9448 | int ret; | 9443 | int ret; |
9449 | 9444 | ||
9450 | if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) { | ||
9451 | printk(KERN_ERR PFX "Attempt to do nvram_write on Sun 570X\n"); | ||
9452 | return -EINVAL; | ||
9453 | } | ||
9454 | |||
9455 | if (tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) { | 9445 | if (tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) { |
9456 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl & | 9446 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl & |
9457 | ~GRC_LCLCTRL_GPIO_OUTPUT1); | 9447 | ~GRC_LCLCTRL_GPIO_OUTPUT1); |
@@ -9578,15 +9568,19 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
9578 | pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, | 9568 | pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, |
9579 | tp->misc_host_ctrl); | 9569 | tp->misc_host_ctrl); |
9580 | 9570 | ||
9571 | /* The memory arbiter has to be enabled in order for SRAM accesses | ||
9572 | * to succeed. Normally on powerup the tg3 chip firmware will make | ||
9573 | * sure it is enabled, but other entities such as system netboot | ||
9574 | * code might disable it. | ||
9575 | */ | ||
9576 | val = tr32(MEMARB_MODE); | ||
9577 | tw32(MEMARB_MODE, val | MEMARB_MODE_ENABLE); | ||
9578 | |||
9581 | tp->phy_id = PHY_ID_INVALID; | 9579 | tp->phy_id = PHY_ID_INVALID; |
9582 | tp->led_ctrl = LED_CTRL_MODE_PHY_1; | 9580 | tp->led_ctrl = LED_CTRL_MODE_PHY_1; |
9583 | 9581 | ||
9584 | /* Do not even try poking around in here on Sun parts. */ | 9582 | /* Assume an onboard device by default. */ |
9585 | if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) { | 9583 | tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; |
9586 | /* All SUN chips are built-in LOMs. */ | ||
9587 | tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; | ||
9588 | return; | ||
9589 | } | ||
9590 | 9584 | ||
9591 | tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val); | 9585 | tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val); |
9592 | if (val == NIC_SRAM_DATA_SIG_MAGIC) { | 9586 | if (val == NIC_SRAM_DATA_SIG_MAGIC) { |
@@ -9686,6 +9680,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
9686 | 9680 | ||
9687 | if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) | 9681 | if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) |
9688 | tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; | 9682 | tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; |
9683 | else | ||
9684 | tp->tg3_flags &= ~TG3_FLAG_EEPROM_WRITE_PROT; | ||
9689 | 9685 | ||
9690 | if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) { | 9686 | if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) { |
9691 | tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; | 9687 | tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; |
@@ -9834,16 +9830,8 @@ static void __devinit tg3_read_partno(struct tg3 *tp) | |||
9834 | int i; | 9830 | int i; |
9835 | u32 magic; | 9831 | u32 magic; |
9836 | 9832 | ||
9837 | if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) { | ||
9838 | /* Sun decided not to put the necessary bits in the | ||
9839 | * NVRAM of their onboard tg3 parts :( | ||
9840 | */ | ||
9841 | strcpy(tp->board_part_number, "Sun 570X"); | ||
9842 | return; | ||
9843 | } | ||
9844 | |||
9845 | if (tg3_nvram_read_swab(tp, 0x0, &magic)) | 9833 | if (tg3_nvram_read_swab(tp, 0x0, &magic)) |
9846 | return; | 9834 | goto out_not_found; |
9847 | 9835 | ||
9848 | if (magic == TG3_EEPROM_MAGIC) { | 9836 | if (magic == TG3_EEPROM_MAGIC) { |
9849 | for (i = 0; i < 256; i += 4) { | 9837 | for (i = 0; i < 256; i += 4) { |
@@ -9874,6 +9862,9 @@ static void __devinit tg3_read_partno(struct tg3 *tp) | |||
9874 | break; | 9862 | break; |
9875 | msleep(1); | 9863 | msleep(1); |
9876 | } | 9864 | } |
9865 | if (!(tmp16 & 0x8000)) | ||
9866 | goto out_not_found; | ||
9867 | |||
9877 | pci_read_config_dword(tp->pdev, vpd_cap + PCI_VPD_DATA, | 9868 | pci_read_config_dword(tp->pdev, vpd_cap + PCI_VPD_DATA, |
9878 | &tmp); | 9869 | &tmp); |
9879 | tmp = cpu_to_le32(tmp); | 9870 | tmp = cpu_to_le32(tmp); |
@@ -9965,37 +9956,6 @@ static void __devinit tg3_read_fw_ver(struct tg3 *tp) | |||
9965 | } | 9956 | } |
9966 | } | 9957 | } |
9967 | 9958 | ||
9968 | #ifdef CONFIG_SPARC64 | ||
9969 | static int __devinit tg3_is_sun_570X(struct tg3 *tp) | ||
9970 | { | ||
9971 | struct pci_dev *pdev = tp->pdev; | ||
9972 | struct pcidev_cookie *pcp = pdev->sysdata; | ||
9973 | |||
9974 | if (pcp != NULL) { | ||
9975 | int node = pcp->prom_node; | ||
9976 | u32 venid; | ||
9977 | int err; | ||
9978 | |||
9979 | err = prom_getproperty(node, "subsystem-vendor-id", | ||
9980 | (char *) &venid, sizeof(venid)); | ||
9981 | if (err == 0 || err == -1) | ||
9982 | return 0; | ||
9983 | if (venid == PCI_VENDOR_ID_SUN) | ||
9984 | return 1; | ||
9985 | |||
9986 | /* TG3 chips onboard the SunBlade-2500 don't have the | ||
9987 | * subsystem-vendor-id set to PCI_VENDOR_ID_SUN but they | ||
9988 | * are distinguishable from non-Sun variants by being | ||
9989 | * named "network" by the firmware. Non-Sun cards will | ||
9990 | * show up as being named "ethernet". | ||
9991 | */ | ||
9992 | if (!strcmp(pcp->prom_name, "network")) | ||
9993 | return 1; | ||
9994 | } | ||
9995 | return 0; | ||
9996 | } | ||
9997 | #endif | ||
9998 | |||
9999 | static int __devinit tg3_get_invariants(struct tg3 *tp) | 9959 | static int __devinit tg3_get_invariants(struct tg3 *tp) |
10000 | { | 9960 | { |
10001 | static struct pci_device_id write_reorder_chipsets[] = { | 9961 | static struct pci_device_id write_reorder_chipsets[] = { |
@@ -10012,11 +9972,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10012 | u16 pci_cmd; | 9972 | u16 pci_cmd; |
10013 | int err; | 9973 | int err; |
10014 | 9974 | ||
10015 | #ifdef CONFIG_SPARC64 | ||
10016 | if (tg3_is_sun_570X(tp)) | ||
10017 | tp->tg3_flags2 |= TG3_FLG2_SUN_570X; | ||
10018 | #endif | ||
10019 | |||
10020 | /* Force memory write invalidate off. If we leave it on, | 9975 | /* Force memory write invalidate off. If we leave it on, |
10021 | * then on 5700_BX chips we have to enable a workaround. | 9976 | * then on 5700_BX chips we have to enable a workaround. |
10022 | * The workaround is to set the TG3PCI_DMA_RW_CTRL boundary | 9977 | * The workaround is to set the TG3PCI_DMA_RW_CTRL boundary |
@@ -10312,8 +10267,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10312 | if (tp->write32 == tg3_write_indirect_reg32 || | 10267 | if (tp->write32 == tg3_write_indirect_reg32 || |
10313 | ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) && | 10268 | ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) && |
10314 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || | 10269 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || |
10315 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) || | 10270 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701))) |
10316 | (tp->tg3_flags2 & TG3_FLG2_SUN_570X)) | ||
10317 | tp->tg3_flags |= TG3_FLAG_SRAM_USE_CONFIG; | 10271 | tp->tg3_flags |= TG3_FLAG_SRAM_USE_CONFIG; |
10318 | 10272 | ||
10319 | /* Get eeprom hw config before calling tg3_set_power_state(). | 10273 | /* Get eeprom hw config before calling tg3_set_power_state(). |
@@ -10594,8 +10548,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) | |||
10594 | #endif | 10548 | #endif |
10595 | 10549 | ||
10596 | mac_offset = 0x7c; | 10550 | mac_offset = 0x7c; |
10597 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && | 10551 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
10598 | !(tp->tg3_flags & TG3_FLG2_SUN_570X)) || | ||
10599 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { | 10552 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { |
10600 | if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID) | 10553 | if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID) |
10601 | mac_offset = 0xcc; | 10554 | mac_offset = 0xcc; |
@@ -10622,8 +10575,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) | |||
10622 | } | 10575 | } |
10623 | if (!addr_ok) { | 10576 | if (!addr_ok) { |
10624 | /* Next, try NVRAM. */ | 10577 | /* Next, try NVRAM. */ |
10625 | if (!(tp->tg3_flags & TG3_FLG2_SUN_570X) && | 10578 | if (!tg3_nvram_read(tp, mac_offset + 0, &hi) && |
10626 | !tg3_nvram_read(tp, mac_offset + 0, &hi) && | ||
10627 | !tg3_nvram_read(tp, mac_offset + 4, &lo)) { | 10579 | !tg3_nvram_read(tp, mac_offset + 4, &lo)) { |
10628 | dev->dev_addr[0] = ((hi >> 16) & 0xff); | 10580 | dev->dev_addr[0] = ((hi >> 16) & 0xff); |
10629 | dev->dev_addr[1] = ((hi >> 24) & 0xff); | 10581 | dev->dev_addr[1] = ((hi >> 24) & 0xff); |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 0e29b885d449..ff0faab94bd5 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2184,7 +2184,7 @@ struct tg3 { | |||
2184 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 | 2184 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 |
2185 | u32 tg3_flags2; | 2185 | u32 tg3_flags2; |
2186 | #define TG3_FLG2_RESTART_TIMER 0x00000001 | 2186 | #define TG3_FLG2_RESTART_TIMER 0x00000001 |
2187 | #define TG3_FLG2_SUN_570X 0x00000002 | 2187 | /* 0x00000002 available */ |
2188 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 | 2188 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 |
2189 | #define TG3_FLG2_IS_5788 0x00000008 | 2189 | #define TG3_FLG2_IS_5788 0x00000008 |
2190 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 | 2190 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 |
@@ -2216,6 +2216,7 @@ struct tg3 { | |||
2216 | #define TG3_FLG2_HW_TSO (TG3_FLG2_HW_TSO_1 | TG3_FLG2_HW_TSO_2) | 2216 | #define TG3_FLG2_HW_TSO (TG3_FLG2_HW_TSO_1 | TG3_FLG2_HW_TSO_2) |
2217 | #define TG3_FLG2_1SHOT_MSI 0x10000000 | 2217 | #define TG3_FLG2_1SHOT_MSI 0x10000000 |
2218 | #define TG3_FLG2_PHY_JITTER_BUG 0x20000000 | 2218 | #define TG3_FLG2_PHY_JITTER_BUG 0x20000000 |
2219 | #define TG3_FLG2_NO_FWARE_REPORTED 0x40000000 | ||
2219 | 2220 | ||
2220 | u32 split_mode_max_reqs; | 2221 | u32 split_mode_max_reqs; |
2221 | #define SPLIT_MODE_5704_MAX_REQ 3 | 2222 | #define SPLIT_MODE_5704_MAX_REQ 3 |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index bbecba02e697..d0318e525ba7 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c | |||
@@ -624,25 +624,28 @@ err_destroy_tx0: | |||
624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, | 624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, |
625 | int slot) | 625 | int slot) |
626 | { | 626 | { |
627 | u16 cookie = 0x0000; | 627 | u16 cookie = 0xF000; |
628 | 628 | ||
629 | /* Use the upper 4 bits of the cookie as | 629 | /* Use the upper 4 bits of the cookie as |
630 | * DMA controller ID and store the slot number | 630 | * DMA controller ID and store the slot number |
631 | * in the lower 12 bits | 631 | * in the lower 12 bits. |
632 | * Note that the cookie must never be 0, as this | ||
633 | * is a special value used in RX path. | ||
632 | */ | 634 | */ |
633 | switch (ring->mmio_base) { | 635 | switch (ring->mmio_base) { |
634 | default: | 636 | default: |
635 | assert(0); | 637 | assert(0); |
636 | case BCM43xx_MMIO_DMA1_BASE: | 638 | case BCM43xx_MMIO_DMA1_BASE: |
639 | cookie = 0xA000; | ||
637 | break; | 640 | break; |
638 | case BCM43xx_MMIO_DMA2_BASE: | 641 | case BCM43xx_MMIO_DMA2_BASE: |
639 | cookie = 0x1000; | 642 | cookie = 0xB000; |
640 | break; | 643 | break; |
641 | case BCM43xx_MMIO_DMA3_BASE: | 644 | case BCM43xx_MMIO_DMA3_BASE: |
642 | cookie = 0x2000; | 645 | cookie = 0xC000; |
643 | break; | 646 | break; |
644 | case BCM43xx_MMIO_DMA4_BASE: | 647 | case BCM43xx_MMIO_DMA4_BASE: |
645 | cookie = 0x3000; | 648 | cookie = 0xD000; |
646 | break; | 649 | break; |
647 | } | 650 | } |
648 | assert(((u16)slot & 0xF000) == 0x0000); | 651 | assert(((u16)slot & 0xF000) == 0x0000); |
@@ -660,16 +663,16 @@ struct bcm43xx_dmaring * parse_cookie(struct bcm43xx_private *bcm, | |||
660 | struct bcm43xx_dmaring *ring = NULL; | 663 | struct bcm43xx_dmaring *ring = NULL; |
661 | 664 | ||
662 | switch (cookie & 0xF000) { | 665 | switch (cookie & 0xF000) { |
663 | case 0x0000: | 666 | case 0xA000: |
664 | ring = dma->tx_ring0; | 667 | ring = dma->tx_ring0; |
665 | break; | 668 | break; |
666 | case 0x1000: | 669 | case 0xB000: |
667 | ring = dma->tx_ring1; | 670 | ring = dma->tx_ring1; |
668 | break; | 671 | break; |
669 | case 0x2000: | 672 | case 0xC000: |
670 | ring = dma->tx_ring2; | 673 | ring = dma->tx_ring2; |
671 | break; | 674 | break; |
672 | case 0x3000: | 675 | case 0xD000: |
673 | ring = dma->tx_ring3; | 676 | ring = dma->tx_ring3; |
674 | break; | 677 | break; |
675 | default: | 678 | default: |
@@ -839,8 +842,18 @@ static void dma_rx(struct bcm43xx_dmaring *ring, | |||
839 | /* We received an xmit status. */ | 842 | /* We received an xmit status. */ |
840 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; | 843 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; |
841 | struct bcm43xx_xmitstatus stat; | 844 | struct bcm43xx_xmitstatus stat; |
845 | int i = 0; | ||
842 | 846 | ||
843 | stat.cookie = le16_to_cpu(hw->cookie); | 847 | stat.cookie = le16_to_cpu(hw->cookie); |
848 | while (stat.cookie == 0) { | ||
849 | if (unlikely(++i >= 10000)) { | ||
850 | assert(0); | ||
851 | break; | ||
852 | } | ||
853 | udelay(2); | ||
854 | barrier(); | ||
855 | stat.cookie = le16_to_cpu(hw->cookie); | ||
856 | } | ||
844 | stat.flags = hw->flags; | 857 | stat.flags = hw->flags; |
845 | stat.cnt1 = hw->cnt1; | 858 | stat.cnt1 = hw->cnt1; |
846 | stat.cnt2 = hw->cnt2; | 859 | stat.cnt2 = hw->cnt2; |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 1456759936c5..10e1a905c144 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -285,9 +285,9 @@ static int pci_device_suspend(struct device * dev, pm_message_t state) | |||
285 | * Default resume method for devices that have no driver provided resume, | 285 | * Default resume method for devices that have no driver provided resume, |
286 | * or not even a driver at all. | 286 | * or not even a driver at all. |
287 | */ | 287 | */ |
288 | static void pci_default_resume(struct pci_dev *pci_dev) | 288 | static int pci_default_resume(struct pci_dev *pci_dev) |
289 | { | 289 | { |
290 | int retval; | 290 | int retval = 0; |
291 | 291 | ||
292 | /* restore the PCI config space */ | 292 | /* restore the PCI config space */ |
293 | pci_restore_state(pci_dev); | 293 | pci_restore_state(pci_dev); |
@@ -297,18 +297,21 @@ static void pci_default_resume(struct pci_dev *pci_dev) | |||
297 | /* if the device was busmaster before the suspend, make it busmaster again */ | 297 | /* if the device was busmaster before the suspend, make it busmaster again */ |
298 | if (pci_dev->is_busmaster) | 298 | if (pci_dev->is_busmaster) |
299 | pci_set_master(pci_dev); | 299 | pci_set_master(pci_dev); |
300 | |||
301 | return retval; | ||
300 | } | 302 | } |
301 | 303 | ||
302 | static int pci_device_resume(struct device * dev) | 304 | static int pci_device_resume(struct device * dev) |
303 | { | 305 | { |
306 | int error; | ||
304 | struct pci_dev * pci_dev = to_pci_dev(dev); | 307 | struct pci_dev * pci_dev = to_pci_dev(dev); |
305 | struct pci_driver * drv = pci_dev->driver; | 308 | struct pci_driver * drv = pci_dev->driver; |
306 | 309 | ||
307 | if (drv && drv->resume) | 310 | if (drv && drv->resume) |
308 | drv->resume(pci_dev); | 311 | error = drv->resume(pci_dev); |
309 | else | 312 | else |
310 | pci_default_resume(pci_dev); | 313 | error = pci_default_resume(pci_dev); |
311 | return 0; | 314 | return error; |
312 | } | 315 | } |
313 | 316 | ||
314 | static void pci_device_shutdown(struct device *dev) | 317 | static void pci_device_shutdown(struct device *dev) |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 2329f941a0dc..12286275b1c8 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -461,9 +461,23 @@ int | |||
461 | pci_restore_state(struct pci_dev *dev) | 461 | pci_restore_state(struct pci_dev *dev) |
462 | { | 462 | { |
463 | int i; | 463 | int i; |
464 | int val; | ||
464 | 465 | ||
465 | for (i = 0; i < 16; i++) | 466 | /* |
466 | pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]); | 467 | * The Base Address register should be programmed before the command |
468 | * register(s) | ||
469 | */ | ||
470 | for (i = 15; i >= 0; i--) { | ||
471 | pci_read_config_dword(dev, i * 4, &val); | ||
472 | if (val != dev->saved_config_space[i]) { | ||
473 | printk(KERN_DEBUG "PM: Writing back config space on " | ||
474 | "device %s at offset %x (was %x, writing %x)\n", | ||
475 | pci_name(dev), i, | ||
476 | val, (int)dev->saved_config_space[i]); | ||
477 | pci_write_config_dword(dev,i * 4, | ||
478 | dev->saved_config_space[i]); | ||
479 | } | ||
480 | } | ||
467 | pci_restore_msi_state(dev); | 481 | pci_restore_msi_state(dev); |
468 | pci_restore_msix_state(dev); | 482 | pci_restore_msix_state(dev); |
469 | return 0; | 483 | return 0; |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 48d3b3d30c21..74b3124e8247 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1143,6 +1143,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) | |||
1143 | { | 1143 | { |
1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); | 1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); |
1145 | 1145 | ||
1146 | if (!s) { | ||
1147 | printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \ | ||
1148 | "failed, event 0x%x lost!\n", skt, event); | ||
1149 | return -ENODEV; | ||
1150 | } | ||
1151 | |||
1146 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", | 1152 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", |
1147 | event, priority, skt); | 1153 | event, priority, skt); |
1148 | 1154 | ||
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index f6e7ee04f3dc..8c0d1a6739ad 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c | |||
@@ -48,33 +48,33 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
48 | struct platform_device *pdev = to_platform_device(dev); | 48 | struct platform_device *pdev = to_platform_device(dev); |
49 | struct m48t86_ops *ops = pdev->dev.platform_data; | 49 | struct m48t86_ops *ops = pdev->dev.platform_data; |
50 | 50 | ||
51 | reg = ops->readb(M48T86_REG_B); | 51 | reg = ops->readbyte(M48T86_REG_B); |
52 | 52 | ||
53 | if (reg & M48T86_REG_B_DM) { | 53 | if (reg & M48T86_REG_B_DM) { |
54 | /* data (binary) mode */ | 54 | /* data (binary) mode */ |
55 | tm->tm_sec = ops->readb(M48T86_REG_SEC); | 55 | tm->tm_sec = ops->readbyte(M48T86_REG_SEC); |
56 | tm->tm_min = ops->readb(M48T86_REG_MIN); | 56 | tm->tm_min = ops->readbyte(M48T86_REG_MIN); |
57 | tm->tm_hour = ops->readb(M48T86_REG_HOUR) & 0x3F; | 57 | tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; |
58 | tm->tm_mday = ops->readb(M48T86_REG_DOM); | 58 | tm->tm_mday = ops->readbyte(M48T86_REG_DOM); |
59 | /* tm_mon is 0-11 */ | 59 | /* tm_mon is 0-11 */ |
60 | tm->tm_mon = ops->readb(M48T86_REG_MONTH) - 1; | 60 | tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; |
61 | tm->tm_year = ops->readb(M48T86_REG_YEAR) + 100; | 61 | tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; |
62 | tm->tm_wday = ops->readb(M48T86_REG_DOW); | 62 | tm->tm_wday = ops->readbyte(M48T86_REG_DOW); |
63 | } else { | 63 | } else { |
64 | /* bcd mode */ | 64 | /* bcd mode */ |
65 | tm->tm_sec = BCD2BIN(ops->readb(M48T86_REG_SEC)); | 65 | tm->tm_sec = BCD2BIN(ops->readbyte(M48T86_REG_SEC)); |
66 | tm->tm_min = BCD2BIN(ops->readb(M48T86_REG_MIN)); | 66 | tm->tm_min = BCD2BIN(ops->readbyte(M48T86_REG_MIN)); |
67 | tm->tm_hour = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F); | 67 | tm->tm_hour = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F); |
68 | tm->tm_mday = BCD2BIN(ops->readb(M48T86_REG_DOM)); | 68 | tm->tm_mday = BCD2BIN(ops->readbyte(M48T86_REG_DOM)); |
69 | /* tm_mon is 0-11 */ | 69 | /* tm_mon is 0-11 */ |
70 | tm->tm_mon = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1; | 70 | tm->tm_mon = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1; |
71 | tm->tm_year = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100; | 71 | tm->tm_year = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100; |
72 | tm->tm_wday = BCD2BIN(ops->readb(M48T86_REG_DOW)); | 72 | tm->tm_wday = BCD2BIN(ops->readbyte(M48T86_REG_DOW)); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* correct the hour if the clock is in 12h mode */ | 75 | /* correct the hour if the clock is in 12h mode */ |
76 | if (!(reg & M48T86_REG_B_H24)) | 76 | if (!(reg & M48T86_REG_B_H24)) |
77 | if (ops->readb(M48T86_REG_HOUR) & 0x80) | 77 | if (ops->readbyte(M48T86_REG_HOUR) & 0x80) |
78 | tm->tm_hour += 12; | 78 | tm->tm_hour += 12; |
79 | 79 | ||
80 | return 0; | 80 | return 0; |
@@ -86,35 +86,35 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
86 | struct platform_device *pdev = to_platform_device(dev); | 86 | struct platform_device *pdev = to_platform_device(dev); |
87 | struct m48t86_ops *ops = pdev->dev.platform_data; | 87 | struct m48t86_ops *ops = pdev->dev.platform_data; |
88 | 88 | ||
89 | reg = ops->readb(M48T86_REG_B); | 89 | reg = ops->readbyte(M48T86_REG_B); |
90 | 90 | ||
91 | /* update flag and 24h mode */ | 91 | /* update flag and 24h mode */ |
92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; | 92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; |
93 | ops->writeb(reg, M48T86_REG_B); | 93 | ops->writebyte(reg, M48T86_REG_B); |
94 | 94 | ||
95 | if (reg & M48T86_REG_B_DM) { | 95 | if (reg & M48T86_REG_B_DM) { |
96 | /* data (binary) mode */ | 96 | /* data (binary) mode */ |
97 | ops->writeb(tm->tm_sec, M48T86_REG_SEC); | 97 | ops->writebyte(tm->tm_sec, M48T86_REG_SEC); |
98 | ops->writeb(tm->tm_min, M48T86_REG_MIN); | 98 | ops->writebyte(tm->tm_min, M48T86_REG_MIN); |
99 | ops->writeb(tm->tm_hour, M48T86_REG_HOUR); | 99 | ops->writebyte(tm->tm_hour, M48T86_REG_HOUR); |
100 | ops->writeb(tm->tm_mday, M48T86_REG_DOM); | 100 | ops->writebyte(tm->tm_mday, M48T86_REG_DOM); |
101 | ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH); | 101 | ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH); |
102 | ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR); | 102 | ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR); |
103 | ops->writeb(tm->tm_wday, M48T86_REG_DOW); | 103 | ops->writebyte(tm->tm_wday, M48T86_REG_DOW); |
104 | } else { | 104 | } else { |
105 | /* bcd mode */ | 105 | /* bcd mode */ |
106 | ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); | 106 | ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); |
107 | ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN); | 107 | ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN); |
108 | ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); | 108 | ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); |
109 | ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); | 109 | ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); |
110 | ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); | 110 | ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); |
111 | ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); | 111 | ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); |
112 | ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); | 112 | ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* update ended */ | 115 | /* update ended */ |
116 | reg &= ~M48T86_REG_B_SET; | 116 | reg &= ~M48T86_REG_B_SET; |
117 | ops->writeb(reg, M48T86_REG_B); | 117 | ops->writebyte(reg, M48T86_REG_B); |
118 | 118 | ||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
@@ -125,12 +125,12 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq) | |||
125 | struct platform_device *pdev = to_platform_device(dev); | 125 | struct platform_device *pdev = to_platform_device(dev); |
126 | struct m48t86_ops *ops = pdev->dev.platform_data; | 126 | struct m48t86_ops *ops = pdev->dev.platform_data; |
127 | 127 | ||
128 | reg = ops->readb(M48T86_REG_B); | 128 | reg = ops->readbyte(M48T86_REG_B); |
129 | 129 | ||
130 | seq_printf(seq, "mode\t\t: %s\n", | 130 | seq_printf(seq, "mode\t\t: %s\n", |
131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); | 131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); |
132 | 132 | ||
133 | reg = ops->readb(M48T86_REG_D); | 133 | reg = ops->readbyte(M48T86_REG_D); |
134 | 134 | ||
135 | seq_printf(seq, "battery\t\t: %s\n", | 135 | seq_printf(seq, "battery\t\t: %s\n", |
136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
@@ -157,7 +157,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) | |||
157 | platform_set_drvdata(dev, rtc); | 157 | platform_set_drvdata(dev, rtc); |
158 | 158 | ||
159 | /* read battery status */ | 159 | /* read battery status */ |
160 | reg = ops->readb(M48T86_REG_D); | 160 | reg = ops->readbyte(M48T86_REG_D); |
161 | dev_info(&dev->dev, "battery %s\n", | 161 | dev_info(&dev->dev, "battery %s\n", |
162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
163 | 163 | ||
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 74a257b23383..e210f89a2449 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -45,11 +45,11 @@ struct pgid { | |||
45 | union { | 45 | union { |
46 | __u8 fc; /* SPID function code */ | 46 | __u8 fc; /* SPID function code */ |
47 | struct path_state ps; /* SNID path state */ | 47 | struct path_state ps; /* SNID path state */ |
48 | } inf; | 48 | } __attribute__ ((packed)) inf; |
49 | union { | 49 | union { |
50 | __u32 cpu_addr : 16; /* CPU address */ | 50 | __u32 cpu_addr : 16; /* CPU address */ |
51 | struct extended_cssid ext_cssid; | 51 | struct extended_cssid ext_cssid; |
52 | } pgid_high; | 52 | } __attribute__ ((packed)) pgid_high; |
53 | __u32 cpu_id : 24; /* CPU identification */ | 53 | __u32 cpu_id : 24; /* CPU identification */ |
54 | __u32 cpu_model : 16; /* CPU model */ | 54 | __u32 cpu_model : 16; /* CPU model */ |
55 | __u32 tod_high; /* high word TOD clock */ | 55 | __u32 tod_high; /* high word TOD clock */ |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 180b3bf8b90d..49ec562d7f60 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -749,7 +749,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
749 | /* Unit check but no sense data. Need basic sense. */ | 749 | /* Unit check but no sense data. Need basic sense. */ |
750 | if (ccw_device_do_sense(cdev, irb) != 0) | 750 | if (ccw_device_do_sense(cdev, irb) != 0) |
751 | goto call_handler_unsol; | 751 | goto call_handler_unsol; |
752 | memcpy(irb, &cdev->private->irb, sizeof(struct irb)); | 752 | memcpy(&cdev->private->irb, irb, sizeof(struct irb)); |
753 | cdev->private->state = DEV_STATE_W4SENSE; | 753 | cdev->private->state = DEV_STATE_W4SENSE; |
754 | cdev->private->intparm = 0; | 754 | cdev->private->intparm = 0; |
755 | return; | 755 | return; |
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index fee843fab1c7..108910f512e4 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c | |||
@@ -982,6 +982,12 @@ static int device_check(ppa_struct *dev) | |||
982 | return -ENODEV; | 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 | static struct scsi_host_template ppa_template = { | 991 | static struct scsi_host_template ppa_template = { |
986 | .module = THIS_MODULE, | 992 | .module = THIS_MODULE, |
987 | .proc_name = "ppa", | 993 | .proc_name = "ppa", |
@@ -997,6 +1003,7 @@ static struct scsi_host_template ppa_template = { | |||
997 | .cmd_per_lun = 1, | 1003 | .cmd_per_lun = 1, |
998 | .use_clustering = ENABLE_CLUSTERING, | 1004 | .use_clustering = ENABLE_CLUSTERING, |
999 | .can_queue = 1, | 1005 | .can_queue = 1, |
1006 | .slave_alloc = ppa_adjust_queue, | ||
1000 | }; | 1007 | }; |
1001 | 1008 | ||
1002 | /*************************************************************************** | 1009 | /*************************************************************************** |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index f7264fd611c2..cb9082fd7e2f 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_port *ap, int verbose, | |||
454 | */ | 454 | */ |
455 | msleep(10); | 455 | msleep(10); |
456 | 456 | ||
457 | prb->ctrl = PRB_CTRL_SRST; | 457 | prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); |
458 | prb->fis[1] = 0; /* no PM yet */ | 458 | prb->fis[1] = 0; /* no PM yet */ |
459 | 459 | ||
460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); | 460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); |
@@ -551,9 +551,9 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
551 | 551 | ||
552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { | 552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { |
553 | if (qc->tf.flags & ATA_TFLAG_WRITE) | 553 | if (qc->tf.flags & ATA_TFLAG_WRITE) |
554 | prb->ctrl = PRB_CTRL_PACKET_WRITE; | 554 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); |
555 | else | 555 | else |
556 | prb->ctrl = PRB_CTRL_PACKET_READ; | 556 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); |
557 | } else | 557 | } else |
558 | prb->ctrl = 0; | 558 | prb->ctrl = 0; |
559 | 559 | ||
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 941c1e15c899..62f8cb7b3d2b 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -165,6 +165,7 @@ static struct { | |||
165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, | 165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, |
166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, | 166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, |
167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, | 167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, |
168 | {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, | ||
168 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, | 169 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, |
169 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, | 170 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, |
170 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, | 171 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 764a8b375ead..faee4757c03a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, | |||
367 | int nsegs, unsigned bufflen, gfp_t gfp) | 367 | int nsegs, unsigned bufflen, gfp_t gfp) |
368 | { | 368 | { |
369 | struct request_queue *q = rq->q; | 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 | unsigned int data_len = 0, len, bytes, off; | 371 | unsigned int data_len = 0, len, bytes, off; |
372 | struct page *page; | 372 | struct page *page; |
373 | struct bio *bio = NULL; | 373 | struct bio *bio = NULL; |
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 8b6d65e21bae..f3b16066387c 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { | 955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { |
956 | struct sas_phy *parent = dev_to_phy(rphy->dev.parent); | 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 | continue; | 960 | continue; |
960 | 961 | ||
961 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && | 962 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && |
@@ -977,7 +978,6 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
977 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ | 978 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ |
978 | i->private_##attrb[count] = class_device_attr_##field; \ | 979 | i->private_##attrb[count] = class_device_attr_##field; \ |
979 | i->private_##attrb[count].attr.mode = perm; \ | 980 | i->private_##attrb[count].attr.mode = perm; \ |
980 | i->private_##attrb[count].store = NULL; \ | ||
981 | i->attrb[count] = &i->private_##attrb[count]; \ | 981 | i->attrb[count] = &i->private_##attrb[count]; \ |
982 | if (test) \ | 982 | if (test) \ |
983 | count++ | 983 | count++ |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 953eb8c171d6..47ba1a79adcd 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -1745,7 +1745,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1745 | fbcon_redraw_move(vc, p, 0, t, count); | 1745 | fbcon_redraw_move(vc, p, 0, t, count); |
1746 | ypan_up_redraw(vc, t, count); | 1746 | ypan_up_redraw(vc, t, count); |
1747 | if (vc->vc_rows - b > 0) | 1747 | if (vc->vc_rows - b > 0) |
1748 | fbcon_redraw_move(vc, p, b - count, | 1748 | fbcon_redraw_move(vc, p, b, |
1749 | vc->vc_rows - b, b); | 1749 | vc->vc_rows - b, b); |
1750 | } else | 1750 | } else |
1751 | fbcon_redraw_move(vc, p, t + count, b - t - count, t); | 1751 | fbcon_redraw_move(vc, p, t + count, b - t - count, t); |