summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/pgtable.h2
-rw-r--r--include/linux/libata.h3
-rw-r--r--include/net/sock.h12
-rw-r--r--include/scsi/scsi_device.h16
4 files changed, 24 insertions, 9 deletions
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index d66484178294..ca0e38c0f8ff 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -496,6 +496,6 @@ extern void update_mmu_cache (struct vm_area_struct *vma, unsigned long vaddr, p
/* These tell get_user_pages() that the first gate page is accessible from user-level. */
#define FIXADDR_USER_START GATE_ADDR
-#define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE)
+#define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)
#endif /* _ASM_IA64_PGTABLE_H */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index e34b31950dd6..feabeae1cfc0 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -310,6 +310,7 @@ struct ata_port {
struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */
u8 ctl; /* cache of ATA control register */
+ u8 last_ctl; /* Cache last written value */
unsigned int bus_state;
unsigned int port_state;
unsigned int pio_mask;
@@ -522,12 +523,12 @@ static inline u8 ata_irq_on(struct ata_port *ap)
struct ata_ioports *ioaddr = &ap->ioaddr;
ap->ctl &= ~ATA_NIEN;
+ ap->last_ctl = ap->ctl;
if (ap->flags & ATA_FLAG_MMIO)
writeb(ap->ctl, ioaddr->ctl_addr);
else
outb(ap->ctl, ioaddr->ctl_addr);
-
return ata_wait_idle(ap);
}
diff --git a/include/net/sock.h b/include/net/sock.h
index 22801b214d98..ac2eccb7ff9a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -917,6 +917,7 @@ static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
static inline int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
int err = 0;
+ int skb_len;
/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
number of warnings when compiling with -W --ANK
@@ -937,9 +938,18 @@ static inline int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
skb->dev = NULL;
skb_set_owner_r(skb, sk);
+
+ /* Cache the SKB length before we tack it onto the receive
+ * queue. Once it is added it no longer belongs to us and
+ * may be freed by other threads of control pulling packets
+ * from the queue.
+ */
+ skb_len = skb->len;
+
skb_queue_tail(&sk->sk_receive_queue, skb);
+
if (!sock_flag(sk, SOCK_DEAD))
- sk->sk_data_ready(sk, skb->len);
+ sk->sk_data_ready(sk, skb_len);
out:
return err;
}
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 63e6f16e76e5..87efd277a1c0 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -14,11 +14,15 @@ struct scsi_mode_data;
/*
* sdev state
*/
-enum {
- SDEV_ADD,
- SDEV_DEL,
- SDEV_CANCEL,
- SDEV_RECOVERY,
+enum scsi_device_state {
+ SDEV_CREATED, /* device created but not added to sysfs
+ * Only internal commands allowed (for inq) */
+ SDEV_RUNNING, /* device properly configured
+ * All commands allowed */
+ SDEV_CANCEL, /* beginning to delete device
+ * Only error handler commands allowed */
+ SDEV_DEL, /* device deleted
+ * no commands allowed */
};
struct scsi_device {
@@ -99,7 +103,7 @@ struct scsi_device {
struct device sdev_gendev;
struct class_device sdev_classdev;
- unsigned long sdev_state;
+ enum scsi_device_state sdev_state;
};
#define to_scsi_device(d) \
container_of(d, struct scsi_device, sdev_gendev)