ieee1394: merge from Linus
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 17 Sep 2006 16:17:19 +0000 (18:17 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 17 Sep 2006 16:19:31 +0000 (18:19 +0200)
Conflicts: drivers/ieee1394/hosts.c
Patch "lockdep: annotate ieee1394 skb-queue-head locking" was meddling
with patch "ieee1394: fix kerneldoc of hpsb_alloc_host".

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1  2 
drivers/ieee1394/hosts.c
drivers/ieee1394/ohci1394.c

diff --combined drivers/ieee1394/hosts.c
@@@ -90,8 -90,6 +90,16 @@@ static int alloc_hostnum_cb(struct hpsb
        return 0;
  }
  
++/*
++ * The pending_packet_queue is special in that it's processed
++ * from hardirq context too (such as hpsb_bus_reset()). Hence
++ * split the lock class from the usual networking skb-head
++ * lock class by using a separate key for it:
++ */
++static struct lock_class_key pending_packet_queue_key;
++
 +static DEFINE_MUTEX(host_num_alloc);
 +
  /**
   * hpsb_alloc_host - allocate a new host controller.
   * @drv: the driver that will manage the host controller
   * Return Value: a pointer to the &hpsb_host if successful, %NULL if
   * no memory was available.
   */
 -static DEFINE_MUTEX(host_num_alloc);
 -
 -/*
 - * The pending_packet_queue is special in that it's processed
 - * from hardirq context too (such as hpsb_bus_reset()). Hence
 - * split the lock class from the usual networking skb-head
 - * lock class by using a separate key for it:
 - */
 -static struct lock_class_key pending_packet_queue_key;
 -
  struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
                                  struct device *dev)
  {
        h->driver = drv;
  
        skb_queue_head_init(&h->pending_packet_queue);
+       lockdep_set_class(&h->pending_packet_queue.lock,
+                          &pending_packet_queue_key);
        INIT_LIST_HEAD(&h->addr_space);
  
        for (i = 2; i < 16; i++)
@@@ -2598,9 -2598,8 +2598,9 @@@ static const int TCODE_SIZE[16] = {20, 
   * Determine the length of a packet in the buffer
   * Optimization suggested by Pascal Drolet <pascal.drolet@informission.ca>
   */
 -static __inline__ int packet_length(struct dma_rcv_ctx *d, int idx, quadlet_t *buf_ptr,
 -                       int offset, unsigned char tcode, int noswap)
 +static inline int packet_length(struct dma_rcv_ctx *d, int idx,
 +                              quadlet_t *buf_ptr, int offset,
 +                              unsigned char tcode, int noswap)
  {
        int length = -1;
  
@@@ -3553,6 -3552,8 +3553,8 @@@ static int ohci1394_pci_resume (struct 
  
  static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
  {
+       pci_save_state(pdev);
  #ifdef CONFIG_PPC_PMAC
        if (machine_is(powermac)) {
                struct device_node *of_node;
        }
  #endif
  
-       pci_save_state(pdev);
        return 0;
  }