diff --git a/[refs] b/[refs]
index ef12ed3e8da4..43bdeea064bd 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 3ce54450461bad18bbe1f9f5aa3ecd2f8e8d1235
+refs/heads/master: 56b11288cb92104d3589930efdc7d0f50b8f4328
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index e5b447a0acda..33121d6c827c 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -527,30 +527,29 @@ and is between 256 and 4096 characters. It is defined in the file
Format: [,]
See also Documentation/networking/decnet.txt.
- vt.default_blu= [VT]
+ default_blu= [VT]
Format: ,,,...,
Change the default blue palette of the console.
This is a 16-member array composed of values
ranging from 0-255.
- vt.default_grn= [VT]
+ default_grn= [VT]
Format: ,,,...,
Change the default green palette of the console.
This is a 16-member array composed of values
ranging from 0-255.
- vt.default_red= [VT]
+ default_red= [VT]
Format: ,,,...,
Change the default red palette of the console.
This is a 16-member array composed of values
ranging from 0-255.
- vt.default_utf8=
- [VT]
+ default_utf8= [VT]
Format=<0|1>
Set system-wide default UTF-8 mode for all tty's.
- Default is 1, i.e. UTF-8 mode is enabled for all
- newly opened terminals.
+ Default is 0 and by setting to 1, it enables UTF-8
+ mode for all newly opened or allocated terminals.
dhash_entries= [KNL]
Set number of hash buckets for dentry cache.
diff --git a/trunk/Makefile b/trunk/Makefile
index 8f08a29539ea..fbb8dfc063d3 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 24
-EXTRAVERSION = -rc7
+EXTRAVERSION = -rc6
NAME = Arr Matey! A Hairy Bilge Rat!
# *DOCUMENTATION*
diff --git a/trunk/arch/arm/mach-pxa/pxa25x.c b/trunk/arch/arm/mach-pxa/pxa25x.c
index dcd81f8d0833..9732d5d9466b 100644
--- a/trunk/arch/arm/mach-pxa/pxa25x.c
+++ b/trunk/arch/arm/mach-pxa/pxa25x.c
@@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
SAVE(GAFR1_L); SAVE(GAFR1_U);
SAVE(GAFR2_L); SAVE(GAFR2_U);
- SAVE(ICMR);
+ SAVE(ICMR); ICMR = 0;
SAVE(CKEN);
SAVE(PSTR);
+
+ /* Clear GPIO transition detect bits */
+ GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
}
static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
{
+ /* ensure not to come back here if it wasn't intended */
+ PSPR = 0;
+
/* restore registers */
RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
@@ -195,7 +201,12 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
+ PSSR = PSSR_RDH | PSSR_PH;
+
RESTORE(CKEN);
+
+ ICLR = 0;
+ ICCR = 1;
RESTORE(ICMR);
RESTORE(PSTR);
}
diff --git a/trunk/arch/ia64/sn/kernel/xp_nofault.S b/trunk/arch/ia64/sn/kernel/xp_nofault.S
index 98e7c7dbfdd8..54e8973b6e99 100644
--- a/trunk/arch/ia64/sn/kernel/xp_nofault.S
+++ b/trunk/arch/ia64/sn/kernel/xp_nofault.S
@@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.
*/
@@ -14,11 +14,6 @@
* PIO read fails, the MCA handler will force the error to look
* corrected and vector to the xp_error_PIOR which will return an error.
*
- * The definition of "consumption" and the time it takes for an MCA
- * to surface is processor implementation specific. This code
- * is sufficient on Itanium through the Montvale processor family.
- * It may need to be adjusted for future processor implementations.
- *
* extern int xp_nofault_PIOR(void *remote_register);
*/
@@ -27,10 +22,11 @@ xp_nofault_PIOR:
mov r8=r0 // Stage a success return value
ld8.acq r9=[r32];; // PIO Read the specified register
adds r9=1,r9;; // Add to force consumption
- srlz.i;; // Allow time for MCA to surface
+ or r9=r9,r9;; // Or to force consumption
br.ret.sptk.many b0;; // Return success
.global xp_error_PIOR
xp_error_PIOR:
mov r8=1 // Return value of 1
br.ret.sptk.many b0;; // Return failure
+
diff --git a/trunk/drivers/connector/connector.c b/trunk/drivers/connector/connector.c
index bf9716b75513..6883fcb79ad3 100644
--- a/trunk/drivers/connector/connector.c
+++ b/trunk/drivers/connector/connector.c
@@ -145,8 +145,6 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v
if (queue_work(dev->cbdev->cn_queue,
&__cbq->work))
err = 0;
- else
- err = -EINVAL;
} else {
struct cn_callback_data *d;
diff --git a/trunk/drivers/hwmon/w83627ehf.c b/trunk/drivers/hwmon/w83627ehf.c
index d5aa25ce5dbd..b15c6a998b72 100644
--- a/trunk/drivers/hwmon/w83627ehf.c
+++ b/trunk/drivers/hwmon/w83627ehf.c
@@ -1276,31 +1276,23 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
data->vrm = vid_which_vrm();
superio_enter(sio_data->sioreg);
+ /* Set VID input sensibility if needed. In theory the BIOS should
+ have set it, but in practice it's not always the case. */
+ en_vrm10 = superio_inb(sio_data->sioreg, SIO_REG_EN_VRM10);
+ if ((en_vrm10 & 0x08) && data->vrm != 100) {
+ dev_warn(dev, "Setting VID input voltage to TTL\n");
+ superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
+ en_vrm10 & ~0x08);
+ } else if (!(en_vrm10 & 0x08) && data->vrm == 100) {
+ dev_warn(dev, "Setting VID input voltage to VRM10\n");
+ superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
+ en_vrm10 | 0x08);
+ }
/* Read VID value */
superio_select(sio_data->sioreg, W83627EHF_LD_HWM);
- if (superio_inb(sio_data->sioreg, SIO_REG_VID_CTRL) & 0x80) {
- /* Set VID input sensibility if needed. In theory the BIOS
- should have set it, but in practice it's not always the
- case. We only do it for the W83627EHF/EHG because the
- W83627DHG is more complex in this respect. */
- if (sio_data->kind == w83627ehf) {
- en_vrm10 = superio_inb(sio_data->sioreg,
- SIO_REG_EN_VRM10);
- if ((en_vrm10 & 0x08) && data->vrm == 90) {
- dev_warn(dev, "Setting VID input voltage to "
- "TTL\n");
- superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
- en_vrm10 & ~0x08);
- } else if (!(en_vrm10 & 0x08) && data->vrm == 100) {
- dev_warn(dev, "Setting VID input voltage to "
- "VRM10\n");
- superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
- en_vrm10 | 0x08);
- }
- }
-
+ if (superio_inb(sio_data->sioreg, SIO_REG_VID_CTRL) & 0x80)
data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f;
- } else {
+ else {
dev_info(dev, "VID pins in output mode, CPU VID not "
"available\n");
data->vid = 0x3f;
diff --git a/trunk/drivers/infiniband/ulp/srp/ib_srp.c b/trunk/drivers/infiniband/ulp/srp/ib_srp.c
index 77e8b90dfbff..950228fb009f 100644
--- a/trunk/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/trunk/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2054,7 +2054,6 @@ static void srp_remove_one(struct ib_device *device)
list_for_each_entry_safe(target, tmp_target,
&host->target_list, list) {
scsi_remove_host(target->scsi_host);
- srp_remove_host(target->scsi_host);
srp_disconnect_target(target);
ib_destroy_cm_id(target->cm_id);
srp_free_target_ib(target);
diff --git a/trunk/drivers/isdn/i4l/isdn_common.c b/trunk/drivers/isdn/i4l/isdn_common.c
index 9cef6fcf587b..d6952959d72a 100644
--- a/trunk/drivers/isdn/i4l/isdn_common.c
+++ b/trunk/drivers/isdn/i4l/isdn_common.c
@@ -914,9 +914,6 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
dflag = 0;
count_pull = count_put = 0;
while ((count_pull < skb->len) && (len > 0)) {
- /* push every character but the last to the tty buffer directly */
- if ( count_put )
- tty_insert_flip_char(tty, last, TTY_NORMAL);
len--;
if (dev->drv[di]->DLEflag & DLEmask) {
last = DLE;
diff --git a/trunk/drivers/isdn/i4l/isdn_tty.c b/trunk/drivers/isdn/i4l/isdn_tty.c
index 9cb6e5021adb..4e5f87c1e714 100644
--- a/trunk/drivers/isdn/i4l/isdn_tty.c
+++ b/trunk/drivers/isdn/i4l/isdn_tty.c
@@ -85,8 +85,6 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
tty_insert_flip_char(tty, DLE, 0);
tty_insert_flip_char(tty, *dp++, 0);
}
- if (*dp == DLE)
- tty_insert_flip_char(tty, DLE, 0);
last = *dp;
} else {
#endif
@@ -2647,12 +2645,7 @@ isdn_tty_modem_result(int code, modem_info * info)
if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
return;
}
-#ifdef CONFIG_ISDN_AUDIO
- if ( !info->vonline )
- tty_ldisc_flush(info->tty);
-#else
tty_ldisc_flush(info->tty);
-#endif
if ((info->flags & ISDN_ASYNC_CHECK_CD) &&
(!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
(info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {
diff --git a/trunk/drivers/net/cassini.c b/trunk/drivers/net/cassini.c
index d66915d82b24..7df31b5561cc 100644
--- a/trunk/drivers/net/cassini.c
+++ b/trunk/drivers/net/cassini.c
@@ -142,8 +142,8 @@
#define DRV_MODULE_NAME "cassini"
#define PFX DRV_MODULE_NAME ": "
-#define DRV_MODULE_VERSION "1.5"
-#define DRV_MODULE_RELDATE "4 Jan 2008"
+#define DRV_MODULE_VERSION "1.4"
+#define DRV_MODULE_RELDATE "1 July 2004"
#define CAS_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
@@ -336,6 +336,30 @@ static inline void cas_mask_intr(struct cas *cp)
cas_disable_irq(cp, i);
}
+static inline void cas_buffer_init(cas_page_t *cp)
+{
+ struct page *page = cp->buffer;
+ atomic_set((atomic_t *)&page->lru.next, 1);
+}
+
+static inline int cas_buffer_count(cas_page_t *cp)
+{
+ struct page *page = cp->buffer;
+ return atomic_read((atomic_t *)&page->lru.next);
+}
+
+static inline void cas_buffer_inc(cas_page_t *cp)
+{
+ struct page *page = cp->buffer;
+ atomic_inc((atomic_t *)&page->lru.next);
+}
+
+static inline void cas_buffer_dec(cas_page_t *cp)
+{
+ struct page *page = cp->buffer;
+ atomic_dec((atomic_t *)&page->lru.next);
+}
+
static void cas_enable_irq(struct cas *cp, const int ring)
{
if (ring == 0) { /* all but TX_DONE */
@@ -473,6 +497,7 @@ static int cas_page_free(struct cas *cp, cas_page_t *page)
{
pci_unmap_page(cp->pdev, page->dma_addr, cp->page_size,
PCI_DMA_FROMDEVICE);
+ cas_buffer_dec(page);
__free_pages(page->buffer, cp->page_order);
kfree(page);
return 0;
@@ -502,6 +527,7 @@ static cas_page_t *cas_page_alloc(struct cas *cp, const gfp_t flags)
page->buffer = alloc_pages(flags, cp->page_order);
if (!page->buffer)
goto page_err;
+ cas_buffer_init(page);
page->dma_addr = pci_map_page(cp->pdev, page->buffer, 0,
cp->page_size, PCI_DMA_FROMDEVICE);
return page;
@@ -580,7 +606,7 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags)
list_for_each_safe(elem, tmp, &list) {
cas_page_t *page = list_entry(elem, cas_page_t, list);
- if (page_count(page->buffer) > 1)
+ if (cas_buffer_count(page) > 1)
continue;
list_del(elem);
@@ -1348,7 +1374,7 @@ static inline cas_page_t *cas_page_spare(struct cas *cp, const int index)
cas_page_t *page = cp->rx_pages[1][index];
cas_page_t *new;
- if (page_count(page->buffer) == 1)
+ if (cas_buffer_count(page) == 1)
return page;
new = cas_page_dequeue(cp);
@@ -1368,7 +1394,7 @@ static cas_page_t *cas_page_swap(struct cas *cp, const int ring,
cas_page_t **page1 = cp->rx_pages[1];
/* swap if buffer is in use */
- if (page_count(page0[index]->buffer) > 1) {
+ if (cas_buffer_count(page0[index]) > 1) {
cas_page_t *new = cas_page_spare(cp, index);
if (new) {
page1[index] = page0[index];
@@ -1953,7 +1979,6 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
struct cas_page *page;
struct sk_buff *skb;
void *addr, *crcaddr;
- __sum16 csum;
char *p;
hlen = CAS_VAL(RX_COMP2_HDR_SIZE, words[1]);
@@ -2037,10 +2062,10 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
skb_shinfo(skb)->nr_frags++;
skb->data_len += hlen - swivel;
- skb->truesize += hlen - swivel;
skb->len += hlen - swivel;
get_page(page->buffer);
+ cas_buffer_inc(page);
frag->page = page->buffer;
frag->page_offset = off;
frag->size = hlen - swivel;
@@ -2065,6 +2090,7 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
frag++;
get_page(page->buffer);
+ cas_buffer_inc(page);
frag->page = page->buffer;
frag->page_offset = 0;
frag->size = hlen;
@@ -2132,15 +2158,14 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
skb_put(skb, alloclen);
}
- csum = (__force __sum16)htons(CAS_VAL(RX_COMP4_TCP_CSUM, words[3]));
+ i = CAS_VAL(RX_COMP4_TCP_CSUM, words[3]);
if (cp->crc_size) {
/* checksum includes FCS. strip it out. */
- csum = csum_fold(csum_partial(crcaddr, cp->crc_size,
- csum_unfold(csum)));
+ i = csum_fold(csum_partial(crcaddr, cp->crc_size, i));
if (addr)
cas_page_unmap(addr);
}
- skb->csum = csum_unfold(~csum);
+ skb->csum = ntohs(i ^ 0xffff);
skb->ip_summed = CHECKSUM_COMPLETE;
skb->protocol = eth_type_trans(skb, cp->dev);
return len;
@@ -2228,7 +2253,7 @@ static int cas_post_rxds_ringN(struct cas *cp, int ring, int num)
released = 0;
while (entry != last) {
/* make a new buffer if it's still in use */
- if (page_count(page[entry]->buffer) > 1) {
+ if (cas_buffer_count(page[entry]) > 1) {
cas_page_t *new = cas_page_dequeue(cp);
if (!new) {
/* let the timer know that we need to
@@ -2586,7 +2611,7 @@ static int cas_poll(struct napi_struct *napi, int budget)
{
struct cas *cp = container_of(napi, struct cas, napi);
struct net_device *dev = cp->dev;
- int i, enable_intr, credits;
+ int i, enable_intr, todo, credits;
u32 status = readl(cp->regs + REG_INTR_STATUS);
unsigned long flags;
@@ -4350,7 +4375,7 @@ static int cas_close(struct net_device *dev)
struct cas *cp = netdev_priv(dev);
#ifdef USE_NAPI
- napi_disable(&cp->napi);
+ napi_enable(&cp->napi);
#endif
/* Make sure we don't get distracted by suspend/resume */
mutex_lock(&cp->pm_mutex);
@@ -4847,90 +4872,6 @@ static int cas_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return rc;
}
-/* When this chip sits underneath an Intel 31154 bridge, it is the
- * only subordinate device and we can tweak the bridge settings to
- * reflect that fact.
- */
-static void __devinit cas_program_bridge(struct pci_dev *cas_pdev)
-{
- struct pci_dev *pdev = cas_pdev->bus->self;
- u32 val;
-
- if (!pdev)
- return;
-
- if (pdev->vendor != 0x8086 || pdev->device != 0x537c)
- return;
-
- /* Clear bit 10 (Bus Parking Control) in the Secondary
- * Arbiter Control/Status Register which lives at offset
- * 0x41. Using a 32-bit word read/modify/write at 0x40
- * is much simpler so that's how we do this.
- */
- pci_read_config_dword(pdev, 0x40, &val);
- val &= ~0x00040000;
- pci_write_config_dword(pdev, 0x40, val);
-
- /* Max out the Multi-Transaction Timer settings since
- * Cassini is the only device present.
- *
- * The register is 16-bit and lives at 0x50. When the
- * settings are enabled, it extends the GRANT# signal
- * for a requestor after a transaction is complete. This
- * allows the next request to run without first needing
- * to negotiate the GRANT# signal back.
- *
- * Bits 12:10 define the grant duration:
- *
- * 1 -- 16 clocks
- * 2 -- 32 clocks
- * 3 -- 64 clocks
- * 4 -- 128 clocks
- * 5 -- 256 clocks
- *
- * All other values are illegal.
- *
- * Bits 09:00 define which REQ/GNT signal pairs get the
- * GRANT# signal treatment. We set them all.
- */
- pci_write_config_word(pdev, 0x50, (5 << 10) | 0x3ff);
-
- /* The Read Prefecth Policy register is 16-bit and sits at
- * offset 0x52. It enables a "smart" pre-fetch policy. We
- * enable it and max out all of the settings since only one
- * device is sitting underneath and thus bandwidth sharing is
- * not an issue.
- *
- * The register has several 3 bit fields, which indicates a
- * multiplier applied to the base amount of prefetching the
- * chip would do. These fields are at:
- *
- * 15:13 --- ReRead Primary Bus
- * 12:10 --- FirstRead Primary Bus
- * 09:07 --- ReRead Secondary Bus
- * 06:04 --- FirstRead Secondary Bus
- *
- * Bits 03:00 control which REQ/GNT pairs the prefetch settings
- * get enabled on. Bit 3 is a grouped enabler which controls
- * all of the REQ/GNT pairs from [8:3]. Bits 2 to 0 control
- * the individual REQ/GNT pairs [2:0].
- */
- pci_write_config_word(pdev, 0x52,
- (0x7 << 13) |
- (0x7 << 10) |
- (0x7 << 7) |
- (0x7 << 4) |
- (0xf << 0));
-
- /* Force cacheline size to 0x8 */
- pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x08);
-
- /* Force latency timer to maximum setting so Cassini can
- * sit on the bus as long as it likes.
- */
- pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xff);
-}
-
static int __devinit cas_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -4986,8 +4927,6 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
printk(KERN_WARNING PFX "Could not enable MWI for %s\n",
pci_name(pdev));
- cas_program_bridge(pdev);
-
/*
* On some architectures, the default cache line size set
* by pci_try_set_mwi reduces perforamnce. We have to increase
diff --git a/trunk/drivers/net/cassini.h b/trunk/drivers/net/cassini.h
index 552af89ca1cf..2f93f83342d2 100644
--- a/trunk/drivers/net/cassini.h
+++ b/trunk/drivers/net/cassini.h
@@ -4122,8 +4122,8 @@ cas_saturn_patch_t cas_saturn_patch[] = {
inserted into
outgoing frame. */
struct cas_tx_desc {
- __le64 control;
- __le64 buffer;
+ u64 control;
+ u64 buffer;
};
/* descriptor ring for free buffers contains page-sized buffers. the index
@@ -4131,8 +4131,8 @@ struct cas_tx_desc {
* the completion ring.
*/
struct cas_rx_desc {
- __le64 index;
- __le64 buffer;
+ u64 index;
+ u64 buffer;
};
/* received packets are put on the completion ring. */
@@ -4210,10 +4210,10 @@ struct cas_rx_desc {
#define RX_INDEX_RELEASE 0x0000000000002000ULL
struct cas_rx_comp {
- __le64 word1;
- __le64 word2;
- __le64 word3;
- __le64 word4;
+ u64 word1;
+ u64 word2;
+ u64 word3;
+ u64 word4;
};
enum link_state {
@@ -4252,7 +4252,7 @@ struct cas_init_block {
struct cas_rx_comp rxcs[N_RX_COMP_RINGS][INIT_BLOCK_RX_COMP];
struct cas_rx_desc rxds[N_RX_DESC_RINGS][INIT_BLOCK_RX_DESC];
struct cas_tx_desc txds[N_TX_RINGS][INIT_BLOCK_TX];
- __le64 tx_compwb;
+ u64 tx_compwb;
};
/* tiny buffers to deal with target abort issue. we allocate a bit
diff --git a/trunk/drivers/scsi/scsi.c b/trunk/drivers/scsi/scsi.c
index 0fb1709ce5e3..7ceb8209e5df 100644
--- a/trunk/drivers/scsi/scsi.c
+++ b/trunk/drivers/scsi/scsi.c
@@ -59,7 +59,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -368,8 +367,9 @@ void scsi_log_send(struct scsi_cmnd *cmd)
scsi_print_command(cmd);
if (level > 3) {
printk(KERN_INFO "buffer = 0x%p, bufflen = %d,"
- " queuecommand 0x%p\n",
+ " done = 0x%p, queuecommand 0x%p\n",
scsi_sglist(cmd), scsi_bufflen(cmd),
+ cmd->done,
cmd->device->host->hostt->queuecommand);
}
@@ -654,12 +654,6 @@ void __scsi_done(struct scsi_cmnd *cmd)
blk_complete_request(rq);
}
-/* Move this to a header if it becomes more generally useful */
-static struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
-{
- return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
-}
-
/*
* Function: scsi_finish_command
*
@@ -671,8 +665,6 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
{
struct scsi_device *sdev = cmd->device;
struct Scsi_Host *shost = sdev->host;
- struct scsi_driver *drv;
- unsigned int good_bytes;
scsi_device_unbusy(sdev);
@@ -698,13 +690,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
"Notifying upper driver of completion "
"(result %x)\n", cmd->result));
- good_bytes = cmd->request_bufflen;
- if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
- drv = scsi_cmd_to_driver(cmd);
- if (drv->done)
- good_bytes = drv->done(cmd);
- }
- scsi_io_completion(cmd, good_bytes);
+ cmd->done(cmd);
}
EXPORT_SYMBOL(scsi_finish_command);
diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c
index ebaca4ca4a13..70700b97c915 100644
--- a/trunk/drivers/scsi/scsi_error.c
+++ b/trunk/drivers/scsi/scsi_error.c
@@ -1699,6 +1699,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd));
scmd->scsi_done = scsi_reset_provider_done_command;
+ scmd->done = NULL;
scmd->request_buffer = NULL;
scmd->request_bufflen = 0;
diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c
index a9ac5b1b1667..8df8267ce316 100644
--- a/trunk/drivers/scsi/scsi_lib.c
+++ b/trunk/drivers/scsi/scsi_lib.c
@@ -1092,6 +1092,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
}
scsi_end_request(cmd, 0, this_count, !result);
}
+EXPORT_SYMBOL(scsi_io_completion);
/*
* Function: scsi_init_io()
@@ -1170,6 +1171,18 @@ static struct scsi_cmnd *scsi_get_cmd_from_req(struct scsi_device *sdev,
return cmd;
}
+static void scsi_blk_pc_done(struct scsi_cmnd *cmd)
+{
+ BUG_ON(!blk_pc_request(cmd->request));
+ /*
+ * This will complete the whole command with uptodate=1 so
+ * as far as the block layer is concerned the command completed
+ * successfully. Since this is a REQ_BLOCK_PC command the
+ * caller should check the request's errors value
+ */
+ scsi_io_completion(cmd, cmd->request_bufflen);
+}
+
int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
{
struct scsi_cmnd *cmd;
@@ -1219,6 +1232,7 @@ int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
cmd->transfersize = req->data_len;
cmd->allowed = req->retries;
cmd->timeout_per_command = req->timeout;
+ cmd->done = scsi_blk_pc_done;
return BLKPREP_OK;
}
EXPORT_SYMBOL(scsi_setup_blk_pc_cmnd);
@@ -1332,7 +1346,7 @@ int scsi_prep_return(struct request_queue *q, struct request *req, int ret)
}
EXPORT_SYMBOL(scsi_prep_return);
-int scsi_prep_fn(struct request_queue *q, struct request *req)
+static int scsi_prep_fn(struct request_queue *q, struct request *req)
{
struct scsi_device *sdev = q->queuedata;
int ret = BLKPREP_KILL;
diff --git a/trunk/drivers/scsi/scsi_priv.h b/trunk/drivers/scsi/scsi_priv.h
index 3f34e9376b0a..ee8efe849bf4 100644
--- a/trunk/drivers/scsi/scsi_priv.h
+++ b/trunk/drivers/scsi/scsi_priv.h
@@ -68,15 +68,11 @@ extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
extern void scsi_device_unbusy(struct scsi_device *sdev);
extern int scsi_queue_insert(struct scsi_cmnd *cmd, int reason);
extern void scsi_next_command(struct scsi_cmnd *cmd);
-extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
extern void scsi_run_host_queues(struct Scsi_Host *shost);
extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev);
extern void scsi_free_queue(struct request_queue *q);
extern int scsi_init_queue(void);
extern void scsi_exit_queue(void);
-struct request_queue;
-struct request;
-extern int scsi_prep_fn(struct request_queue *, struct request *);
/* scsi_proc.c */
#ifdef CONFIG_SCSI_PROC_FS
diff --git a/trunk/drivers/scsi/scsi_sysfs.c b/trunk/drivers/scsi/scsi_sysfs.c
index 00b386677392..f374fdcb6815 100644
--- a/trunk/drivers/scsi/scsi_sysfs.c
+++ b/trunk/drivers/scsi/scsi_sysfs.c
@@ -373,29 +373,12 @@ static int scsi_bus_resume(struct device * dev)
return err;
}
-static int scsi_bus_remove(struct device *dev)
-{
- struct device_driver *drv = dev->driver;
- struct scsi_device *sdev = to_scsi_device(dev);
- int err = 0;
-
- /* reset the prep_fn back to the default since the
- * driver may have altered it and it's being removed */
- blk_queue_prep_rq(sdev->request_queue, scsi_prep_fn);
-
- if (drv && drv->remove)
- err = drv->remove(dev);
-
- return 0;
-}
-
struct bus_type scsi_bus_type = {
.name = "scsi",
.match = scsi_bus_match,
.uevent = scsi_bus_uevent,
.suspend = scsi_bus_suspend,
.resume = scsi_bus_resume,
- .remove = scsi_bus_remove,
};
int scsi_sysfs_register(void)
diff --git a/trunk/drivers/scsi/scsi_transport_srp.c b/trunk/drivers/scsi/scsi_transport_srp.c
index 65c584db33bd..44a340bd937b 100644
--- a/trunk/drivers/scsi/scsi_transport_srp.c
+++ b/trunk/drivers/scsi/scsi_transport_srp.c
@@ -265,8 +265,7 @@ EXPORT_SYMBOL_GPL(srp_rport_del);
static int do_srp_rport_del(struct device *dev, void *data)
{
- if (scsi_is_srp_rport(dev))
- srp_rport_del(dev_to_rport(dev));
+ srp_rport_del(dev_to_rport(dev));
return 0;
}
diff --git a/trunk/drivers/scsi/sd.c b/trunk/drivers/scsi/sd.c
index a69b155f39a2..cb85296d5384 100644
--- a/trunk/drivers/scsi/sd.c
+++ b/trunk/drivers/scsi/sd.c
@@ -86,19 +86,6 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_DISK);
MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);
-static int sd_revalidate_disk(struct gendisk *);
-static int sd_probe(struct device *);
-static int sd_remove(struct device *);
-static void sd_shutdown(struct device *);
-static int sd_suspend(struct device *, pm_message_t state);
-static int sd_resume(struct device *);
-static void sd_rescan(struct device *);
-static int sd_done(struct scsi_cmnd *);
-static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
-static void scsi_disk_release(struct class_device *cdev);
-static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
-static void sd_print_result(struct scsi_disk *, int);
-
static DEFINE_IDR(sd_index_idr);
static DEFINE_SPINLOCK(sd_index_lock);
@@ -253,7 +240,6 @@ static struct scsi_driver sd_template = {
.shutdown = sd_shutdown,
},
.rescan = sd_rescan,
- .done = sd_done,
};
/*
@@ -522,6 +508,12 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
SCpnt->allowed = SD_MAX_RETRIES;
SCpnt->timeout_per_command = timeout;
+ /*
+ * This is the completion routine we use. This is matched in terms
+ * of capability to this function.
+ */
+ SCpnt->done = sd_rw_intr;
+
/*
* This indicates that the command is ready from our end to be
* queued.
@@ -895,13 +887,13 @@ static struct block_device_operations sd_fops = {
};
/**
- * sd_done - bottom half handler: called when the lower level
+ * sd_rw_intr - bottom half handler: called when the lower level
* driver has completed (successfully or otherwise) a scsi command.
* @SCpnt: mid-level's per command structure.
*
* Note: potentially run from within an ISR. Must not block.
**/
-static int sd_done(struct scsi_cmnd *SCpnt)
+static void sd_rw_intr(struct scsi_cmnd * SCpnt)
{
int result = SCpnt->result;
unsigned int xfer_size = SCpnt->request_bufflen;
@@ -922,7 +914,7 @@ static int sd_done(struct scsi_cmnd *SCpnt)
SCSI_LOG_HLCOMPLETE(1, scsi_print_result(SCpnt));
if (sense_valid) {
SCSI_LOG_HLCOMPLETE(1, scmd_printk(KERN_INFO, SCpnt,
- "sd_done: sb[respc,sk,asc,"
+ "sd_rw_intr: sb[respc,sk,asc,"
"ascq]=%x,%x,%x,%x\n",
sshdr.response_code,
sshdr.sense_key, sshdr.asc,
@@ -994,7 +986,7 @@ static int sd_done(struct scsi_cmnd *SCpnt)
break;
}
out:
- return good_bytes;
+ scsi_io_completion(SCpnt, good_bytes);
}
static int media_not_present(struct scsi_disk *sdkp,
diff --git a/trunk/drivers/scsi/sr.c b/trunk/drivers/scsi/sr.c
index c61999031141..a0c4e13d4dab 100644
--- a/trunk/drivers/scsi/sr.c
+++ b/trunk/drivers/scsi/sr.c
@@ -78,7 +78,6 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_WORM);
static int sr_probe(struct device *);
static int sr_remove(struct device *);
-static int sr_done(struct scsi_cmnd *);
static struct scsi_driver sr_template = {
.owner = THIS_MODULE,
@@ -87,7 +86,6 @@ static struct scsi_driver sr_template = {
.probe = sr_probe,
.remove = sr_remove,
},
- .done = sr_done,
};
static unsigned long sr_index_bits[SR_DISKS / BITS_PER_LONG];
@@ -210,12 +208,12 @@ static int sr_media_change(struct cdrom_device_info *cdi, int slot)
}
/*
- * sr_done is the interrupt routine for the device driver.
+ * rw_intr is the interrupt routine for the device driver.
*
- * It will be notified on the end of a SCSI read / write, and will take one
+ * It will be notified on the end of a SCSI read / write, and will take on
* of several actions based on success or failure.
*/
-static int sr_done(struct scsi_cmnd *SCpnt)
+static void rw_intr(struct scsi_cmnd * SCpnt)
{
int result = SCpnt->result;
int this_count = SCpnt->request_bufflen;
@@ -288,7 +286,12 @@ static int sr_done(struct scsi_cmnd *SCpnt)
}
}
- return good_bytes;
+ /*
+ * This calls the generic completion function, now that we know
+ * how many actual sectors finished, and how many sectors we need
+ * to say have failed.
+ */
+ scsi_io_completion(SCpnt, good_bytes);
}
static int sr_prep_fn(struct request_queue *q, struct request *rq)
@@ -424,6 +427,12 @@ static int sr_prep_fn(struct request_queue *q, struct request *rq)
SCpnt->allowed = MAX_RETRIES;
SCpnt->timeout_per_command = timeout;
+ /*
+ * This is the completion routine we use. This is matched in terms
+ * of capability to this function.
+ */
+ SCpnt->done = rw_intr;
+
/*
* This indicates that the command is ready from our end to be
* queued.
diff --git a/trunk/fs/compat_ioctl.c b/trunk/fs/compat_ioctl.c
index da8cb3b3592c..e8b7c3a98a54 100644
--- a/trunk/fs/compat_ioctl.c
+++ b/trunk/fs/compat_ioctl.c
@@ -10,8 +10,6 @@
* ioctls.
*/
-#include
-
#include
#include
#include
@@ -2644,12 +2642,6 @@ COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES)
COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)
-/* joystick */
-COMPATIBLE_IOCTL(JSIOCGVERSION)
-COMPATIBLE_IOCTL(JSIOCGAXES)
-COMPATIBLE_IOCTL(JSIOCGBUTTONS)
-COMPATIBLE_IOCTL(JSIOCGNAME(0))
-
/* now things that need handlers */
HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c
index 9e2e1c7291db..f03d9d5f5ba4 100644
--- a/trunk/fs/nfs/nfs4proc.c
+++ b/trunk/fs/nfs/nfs4proc.c
@@ -741,10 +741,10 @@ static void nfs4_open_confirm_done(struct rpc_task *task, void *calldata)
if (data->rpc_status == 0) {
memcpy(data->o_res.stateid.data, data->c_res.stateid.data,
sizeof(data->o_res.stateid.data));
- nfs_confirm_seqid(&data->owner->so_seqid, 0);
renew_lease(data->o_res.server, data->timestamp);
data->rpc_done = 1;
}
+ nfs_confirm_seqid(&data->owner->so_seqid, data->rpc_status);
nfs_increment_open_seqid(data->rpc_status, data->c_arg.seqid);
}
@@ -759,6 +759,7 @@ static void nfs4_open_confirm_release(void *calldata)
/* In case of error, no cleanup! */
if (!data->rpc_done)
goto out_free;
+ nfs_confirm_seqid(&data->owner->so_seqid, 0);
state = nfs4_opendata_to_nfs4_state(data);
if (!IS_ERR(state))
nfs4_close_state(&data->path, state, data->o_arg.open_flags);
@@ -885,6 +886,7 @@ static void nfs4_open_release(void *calldata)
/* In case we need an open_confirm, no cleanup! */
if (data->o_res.rflags & NFS4_OPEN_RESULT_CONFIRM)
goto out_free;
+ nfs_confirm_seqid(&data->owner->so_seqid, 0);
state = nfs4_opendata_to_nfs4_state(data);
if (!IS_ERR(state))
nfs4_close_state(&data->path, state, data->o_arg.open_flags);
@@ -3331,12 +3333,6 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
p->arg.fh = NFS_FH(inode);
p->arg.fl = &p->fl;
- if (!(lsp->ls_seqid.flags & NFS_SEQID_CONFIRMED)) {
- p->arg.open_seqid = nfs_alloc_seqid(&lsp->ls_state->owner->so_seqid);
- if (p->arg.open_seqid == NULL)
- goto out_free;
-
- }
p->arg.lock_seqid = nfs_alloc_seqid(&lsp->ls_seqid);
if (p->arg.lock_seqid == NULL)
goto out_free;
@@ -3349,8 +3345,6 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
memcpy(&p->fl, fl, sizeof(p->fl));
return p;
out_free:
- if (p->arg.open_seqid != NULL)
- nfs_free_seqid(p->arg.open_seqid);
kfree(p);
return NULL;
}
@@ -3367,23 +3361,23 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata)
.rpc_cred = sp->so_cred,
};
+ if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0)
+ return;
dprintk("%s: begin!\n", __FUNCTION__);
/* Do we need to do an open_to_lock_owner? */
if (!(data->arg.lock_seqid->sequence->flags & NFS_SEQID_CONFIRMED)) {
- if (nfs_wait_on_sequence(data->arg.open_seqid, task) != 0)
- return;
+ data->arg.open_seqid = nfs_alloc_seqid(&sp->so_seqid);
+ if (data->arg.open_seqid == NULL) {
+ data->rpc_status = -ENOMEM;
+ task->tk_action = NULL;
+ goto out;
+ }
data->arg.open_stateid = &state->stateid;
data->arg.new_lock_owner = 1;
- /* Retest in case we raced... */
- if (!(data->arg.lock_seqid->sequence->flags & NFS_SEQID_CONFIRMED))
- goto do_rpc;
}
- if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0)
- return;
- data->arg.new_lock_owner = 0;
-do_rpc:
data->timestamp = jiffies;
rpc_call_setup(task, &msg, 0);
+out:
dprintk("%s: done!, ret = %d\n", __FUNCTION__, data->rpc_status);
}
@@ -3419,6 +3413,8 @@ static void nfs4_lock_release(void *calldata)
struct nfs4_lockdata *data = calldata;
dprintk("%s: begin!\n", __FUNCTION__);
+ if (data->arg.open_seqid != NULL)
+ nfs_free_seqid(data->arg.open_seqid);
if (data->cancelled != 0) {
struct rpc_task *task;
task = nfs4_do_unlck(&data->fl, data->ctx, data->lsp,
@@ -3428,8 +3424,6 @@ static void nfs4_lock_release(void *calldata)
dprintk("%s: cancelling lock!\n", __FUNCTION__);
} else
nfs_free_seqid(data->arg.lock_seqid);
- if (data->arg.open_seqid != NULL)
- nfs_free_seqid(data->arg.open_seqid);
nfs4_put_lock_state(data->lsp);
put_nfs_open_context(data->ctx);
kfree(data);
diff --git a/trunk/fs/nfs/nfs4renewd.c b/trunk/fs/nfs/nfs4renewd.c
index 5e2e4af1a0e6..3ea352d82eba 100644
--- a/trunk/fs/nfs/nfs4renewd.c
+++ b/trunk/fs/nfs/nfs4renewd.c
@@ -133,7 +133,9 @@ nfs4_renewd_prepare_shutdown(struct nfs_server *server)
void
nfs4_kill_renewd(struct nfs_client *clp)
{
+ down_read(&clp->cl_sem);
cancel_delayed_work_sync(&clp->cl_renewd);
+ up_read(&clp->cl_sem);
}
/*
diff --git a/trunk/fs/nfs/super.c b/trunk/fs/nfs/super.c
index 0b0c72a072ff..ea929207f274 100644
--- a/trunk/fs/nfs/super.c
+++ b/trunk/fs/nfs/super.c
@@ -1475,7 +1475,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
error = PTR_ERR(mntroot);
goto error_splat_super;
}
- if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
+ if (mntroot->d_inode->i_op != server->nfs_client->rpc_ops->dir_inode_ops) {
dput(mntroot);
error = -ESTALE;
goto error_splat_super;
@@ -1826,11 +1826,6 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
error = PTR_ERR(mntroot);
goto error_splat_super;
}
- if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
- dput(mntroot);
- error = -ESTALE;
- goto error_splat_super;
- }
s->s_flags |= MS_ACTIVE;
mnt->mnt_sb = s;
@@ -1905,11 +1900,6 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
error = PTR_ERR(mntroot);
goto error_splat_super;
}
- if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
- dput(mntroot);
- error = -ESTALE;
- goto error_splat_super;
- }
s->s_flags |= MS_ACTIVE;
mnt->mnt_sb = s;
diff --git a/trunk/include/asm-ia64/sn/xpc.h b/trunk/include/asm-ia64/sn/xpc.h
index 3c0900ab8003..8e5d7de9c632 100644
--- a/trunk/include/asm-ia64/sn/xpc.h
+++ b/trunk/include/asm-ia64/sn/xpc.h
@@ -1211,13 +1211,11 @@ xpc_IPI_init(int index)
static inline enum xpc_retval
xpc_map_bte_errors(bte_result_t error)
{
- if (error == BTE_SUCCESS)
- return xpcSuccess;
-
if (is_shub2()) {
if (BTE_VALID_SH2_ERROR(error))
return xpcBteSh2Start + error;
- return xpcBteUnmappedError;
+ else
+ return xpcBteUnmappedError;
}
switch (error) {
case BTE_SUCCESS: return xpcSuccess;
diff --git a/trunk/include/linux/cpu.h b/trunk/include/linux/cpu.h
index 92f2029a34f3..b79c57569367 100644
--- a/trunk/include/linux/cpu.h
+++ b/trunk/include/linux/cpu.h
@@ -107,6 +107,7 @@ extern void unlock_cpu_hotplug(void);
#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
int cpu_down(unsigned int cpu);
+#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
#else /* CONFIG_HOTPLUG_CPU */
@@ -121,6 +122,9 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
/* These aren't inline functions due to a GCC bug. */
#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
+
+/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
+static inline int cpu_is_offline(int cpu) { return 0; }
#endif /* CONFIG_HOTPLUG_CPU */
#ifdef CONFIG_PM_SLEEP_SMP
diff --git a/trunk/include/linux/cpumask.h b/trunk/include/linux/cpumask.h
index 85bd790c201e..23f55140ccd5 100644
--- a/trunk/include/linux/cpumask.h
+++ b/trunk/include/linux/cpumask.h
@@ -397,8 +397,6 @@ extern cpumask_t cpu_present_map;
#define cpu_present(cpu) ((cpu) == 0)
#endif
-#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
-
#ifdef CONFIG_SMP
extern int nr_cpu_ids;
#define any_online_cpu(mask) __any_online_cpu(&(mask))
diff --git a/trunk/include/scsi/scsi_cmnd.h b/trunk/include/scsi/scsi_cmnd.h
index 3f47e522a1ec..7613c2989370 100644
--- a/trunk/include/scsi/scsi_cmnd.h
+++ b/trunk/include/scsi/scsi_cmnd.h
@@ -34,6 +34,7 @@ struct scsi_cmnd {
struct list_head list; /* scsi_cmnd participates in queue lists */
struct list_head eh_entry; /* entry for the host eh_cmd_q */
int eh_eflags; /* Used by error handlr */
+ void (*done) (struct scsi_cmnd *); /* Mid-level done function */
/*
* A SCSI Command is assigned a nonzero serial_number before passed
@@ -121,6 +122,7 @@ extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t);
extern void scsi_put_command(struct scsi_cmnd *);
extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *,
struct device *);
+extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
extern void scsi_finish_command(struct scsi_cmnd *cmd);
extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd);
diff --git a/trunk/include/scsi/scsi_driver.h b/trunk/include/scsi/scsi_driver.h
index 1f5ca7f62116..56a304709fde 100644
--- a/trunk/include/scsi/scsi_driver.h
+++ b/trunk/include/scsi/scsi_driver.h
@@ -15,7 +15,6 @@ struct scsi_driver {
struct device_driver gendrv;
void (*rescan)(struct device *);
- int (*done)(struct scsi_cmnd *);
};
#define to_scsi_driver(drv) \
container_of((drv), struct scsi_driver, gendrv)
diff --git a/trunk/include/scsi/sd.h b/trunk/include/scsi/sd.h
index f7513313ef0d..aa1e71613010 100644
--- a/trunk/include/scsi/sd.h
+++ b/trunk/include/scsi/sd.h
@@ -47,6 +47,19 @@ struct scsi_disk {
};
#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev)
+static int sd_revalidate_disk(struct gendisk *disk);
+static void sd_rw_intr(struct scsi_cmnd * SCpnt);
+static int sd_probe(struct device *);
+static int sd_remove(struct device *);
+static void sd_shutdown(struct device *dev);
+static int sd_suspend(struct device *dev, pm_message_t state);
+static int sd_resume(struct device *dev);
+static void sd_rescan(struct device *);
+static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
+static void scsi_disk_release(struct class_device *cdev);
+static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
+static void sd_print_result(struct scsi_disk *, int);
+
#define sd_printk(prefix, sdsk, fmt, a...) \
(sdsk)->disk ? \
sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \
diff --git a/trunk/kernel/sched_debug.c b/trunk/kernel/sched_debug.c
index 80fbbfc04290..d30467b47ddd 100644
--- a/trunk/kernel/sched_debug.c
+++ b/trunk/kernel/sched_debug.c
@@ -31,9 +31,9 @@
/*
* Ease the printing of nsec fields:
*/
-static long long nsec_high(unsigned long long nsec)
+static long long nsec_high(long long nsec)
{
- if ((long long)nsec < 0) {
+ if (nsec < 0) {
nsec = -nsec;
do_div(nsec, 1000000);
return -nsec;
@@ -43,9 +43,9 @@ static long long nsec_high(unsigned long long nsec)
return nsec;
}
-static unsigned long nsec_low(unsigned long long nsec)
+static unsigned long nsec_low(long long nsec)
{
- if ((long long)nsec < 0)
+ if (nsec < 0)
nsec = -nsec;
return do_div(nsec, 1000000);
diff --git a/trunk/net/ipv4/devinet.c b/trunk/net/ipv4/devinet.c
index b42f74617bac..3168c3de4919 100644
--- a/trunk/net/ipv4/devinet.c
+++ b/trunk/net/ipv4/devinet.c
@@ -1027,7 +1027,7 @@ static void inetdev_changename(struct net_device *dev, struct in_device *in_dev)
memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
if (named++ == 0)
continue;
- dot = strchr(old, ':');
+ dot = strchr(ifa->ifa_label, ':');
if (dot == NULL) {
sprintf(old, ":%d", named);
dot = old;
diff --git a/trunk/net/sunrpc/auth_gss/auth_gss.c b/trunk/net/sunrpc/auth_gss/auth_gss.c
index 1f2d85e869c0..a6e57d1c2eb6 100644
--- a/trunk/net/sunrpc/auth_gss/auth_gss.c
+++ b/trunk/net/sunrpc/auth_gss/auth_gss.c
@@ -625,7 +625,7 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
err = -EINVAL;
gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor);
if (!gss_auth->mech) {
- printk(KERN_WARNING "%s: Pseudoflavor %d not found!\n",
+ printk(KERN_WARNING "%s: Pseudoflavor %d not found!",
__FUNCTION__, flavor);
goto err_free;
}
diff --git a/trunk/net/x25/x25_forward.c b/trunk/net/x25/x25_forward.c
index 34478035e05e..8738ec7ce693 100644
--- a/trunk/net/x25/x25_forward.c
+++ b/trunk/net/x25/x25_forward.c
@@ -118,14 +118,13 @@ int x25_forward_data(int lci, struct x25_neigh *from, struct sk_buff *skb) {
goto out;
if ( (skbn = pskb_copy(skb, GFP_ATOMIC)) == NULL){
- goto output;
+ goto out;
}
x25_transmit_link(skbn, nb);
- rc = 1;
-output:
x25_neigh_put(nb);
+ rc = 1;
out:
return rc;
}
diff --git a/trunk/net/xfrm/xfrm_state.c b/trunk/net/xfrm/xfrm_state.c
index f26aaaca1fae..ee1e69753932 100644
--- a/trunk/net/xfrm/xfrm_state.c
+++ b/trunk/net/xfrm/xfrm_state.c
@@ -1749,7 +1749,6 @@ void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid)
}
EXPORT_SYMBOL(km_policy_expired);
-#ifdef CONFIG_XFRM_MIGRATE
int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
struct xfrm_migrate *m, int num_migrate)
{
@@ -1769,7 +1768,6 @@ int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
return err;
}
EXPORT_SYMBOL(km_migrate);
-#endif
int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr)
{
diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c
index 62b9fb386903..3fa0f9704909 100644
--- a/trunk/sound/pci/hda/hda_intel.c
+++ b/trunk/sound/pci/hda/hda_intel.c
@@ -555,8 +555,7 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
}
if (!chip->rirb.cmds)
return chip->rirb.res; /* the last value */
- udelay(10);
- cond_resched();
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(timeout, jiffies));
if (chip->msi) {