1. 29 Apr, 2007 2 commits
    • Stefan Richter's avatar
      ieee1394: sbp2: enforce 32bit DMA mapping · 0555659d
      Stefan Richter authored
      In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
      ORBs, and response buffers have to reside within the first 4 GB of the
      FireWire controller's physical address space.  Set the correct mask for
      DMA mappings.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      0555659d
    • Stefan Richter's avatar
      ieee1394: sbp2: remove unnecessary alignments of struct members · f412bf44
      Stefan Richter authored
      The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of
      sbp2.h::sbp2_command_info do not have to be aligned themselves --- only
      the memory which they point to has to be.
      
      The member "struct sbp2_command_orb command_orb" has to be aligned on
      4 bytes boundary which is guaranteed because it contains u32 members.
      
      The member "struct sbp2_unrestricted_page_table scatter_gather_element",
      i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary
      according to the SBP-2 spec.  This is not a requirement for FireWire
      controllers but could be expected by SBP-2 targets.
      
      I see no need to align the members command_orb and
      scatter_gather_element on CPU cacheline boundaries.  It could have
      performance benefits, but on the other hand sbp2 has a somewhat wasteful
      allocation scheme which should be optimized first before further tweaks
      like cacheline alignments.  (E.g. don't always allocate SG_ALL s/g table
      elements.)
      
      Note, before as well as after the patch, the code relies on the
      assumption that memory alignment in the virtual address space is
      preserved in the physical address space after DMA mapping.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      f412bf44
  2. 28 Apr, 2007 3 commits
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 · b9099ff6
      Linus Torvalds authored
      * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
        sis900: Allocate rx replacement buffer before rx operation
        usb-net/pegasus: simplify carrier detection
      b9099ff6
    • Neil Horman's avatar
      sis900: Allocate rx replacement buffer before rx operation · dc5a1449
      Neil Horman authored
      Just found a hole in my last patch.  It was reported to me that shortly after we
      integrated this patch.  The report was of an oops that took place inside of
      netif_rx when using the sis900 driver.  Looking at my origional patch I noted
      that there was a spot between the new skb_alloc and the refill_rx_ring label
      where skb got reassigned to the pointer currently held in the rx_ring for the
      purposes of receiveing the frame.  The result of this is however that the buffer
      that gets passed to netif_rx (if it is called), then gets placed right back into
      the rx_ring.  So if you receive frames fast enough the skb being processed by
      the network stack can get corrupted.  The reporter is testing out the fix I've
      written for this below (I'm not near my hardware at the moment to test myself),
      but I wanted to post it for review ASAP.  I'll post test results when I hear
      them, but I think this is a pretty straightforward fix.  It just uses a separate
      pointer to do the rx operation, so that we don't improperly reassign the pointer
      that we use to refill the rx ring.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      dc5a1449
    • Dan Williams's avatar
      usb-net/pegasus: simplify carrier detection · 1764f150
      Dan Williams authored
      Simplify pegasus carrier detection; rely only on the periodic MII
      polling.  Reverts pieces of c43c49bd.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1764f150
  3. 27 Apr, 2007 35 commits