1. 07 Aug, 2007 6 commits
  2. 05 Aug, 2007 2 commits
  3. 04 Aug, 2007 11 commits
    • Salyzyn, Mark's avatar
      [SCSI] aacraid: prevent panic on adapter resource failure · 2b053729
      Salyzyn, Mark authored
      If the driver fails to allocate the contiguous (DMAable) memory for
      system reasons, we fail to load the instance, but then we try to free
      the <nul> allocation in the cleanup code and we get a panic in
      pci_free_consistent(). This is reported against an older kernel, hope
      this is relevant for latest/greatest.
      Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      2b053729
    • Boaz Harrosh's avatar
      [SCSI] aha152x: use data accessors and !use_sg cleanup · 2338545a
      Boaz Harrosh authored
      And finally this is the regular !use_sg cleanup
      and use of data accessors.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      2338545a
    • Boaz Harrosh's avatar
      [SCSI] aha152x: Fix check_condition code-path · 45333ffa
      Boaz Harrosh authored
      check_condition code-path was similar but more
      complicated to Reset. It went like this:
      
        1. extra space was allocated at aha152x_scdata for mirroring
          scsi_cmnd members.
        2. At aha152x_internal_queue() every not check_condition
          (REQUEST_SENSE) command was copied to above members in
          case of error.
        3. At busfree_run() in the DONE_CS phase if a Status of
          SAM_STAT_CHECK_CONDITION was detected. The command was
          re-queued Internally using aha152x_internal_queue(,,check_condition,)
          The old command members are over written with the
          REQUEST_SENSE info.
        4. At busfree_run() in the DONE_CS phase again. If it is a
          check_condition command, info was restored from mirror
          made at first call to aha152x_internal_queue() (see 2)
          and the command is completed.
      
      What I did is:
      
        1. Allocate less space in aha152x_scdata only for the 16-byte
          original command. (which is actually not needed by scsi-ml
          anymore at this stage. But this is to much knowledge of scsi-ml)
        2. If Status == SAM_STAT_CHECK_CONDITION, then like before
           re-queue a REQUEST_SENSE command. But only now save original
           command members. (Less of them)
        3. In aha152x_internal_queue(), just like for Reset, use the
          check_condition hint to set differently the working members.
          execute the command.
        4. At busfree_run() in the DONE_CS phase again. restore needed
           members.
      
      While at it. This patch fixes a BUG. Old code when sending
      a REQUEST_SENSE for a failed command. Would than return with
      cmd->resid == 0 which was the status of the REQUEST_SENSE.
      The failing command resid was lost. And when would resid
      be interesting if not on a failing command?
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      45333ffa
    • Boaz Harrosh's avatar
      [SCSI] aha152x: Clean Reset path · 66acdb03
      Boaz Harrosh authored
      What Reset code was doing:  Save command's important/dangerous
      Info on stack. NULL those members from scsi_cmnd.
      Issue a Reset. wait for it to finish than restore members
      and return.
      
      What I do is save or NULL nothing. But use the "resetting"
      hint in aha152x_internal_queue() to NULL out working members
      and leave struct scsi_cmnd alone.
      
      The indent here looks funny but it will change/drop in last
      patch and it is clear this way what changed.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      66acdb03
    • Boaz Harrosh's avatar
      [SCSI] aha152x: preliminary fixes and some comments · 0ceb4798
      Boaz Harrosh authored
        hunk by hunk:
        - CHECK_CONDITION is what happens to cmnd->status >> 1
          or after status_byte() macro. But here it is used
          directly on status which means 0x1 which is an undefined
          bit in the standard. And is a status that will never
          return from a target.
      
        - in busfree_run at the DONE_SC phase we have 3 distinct
          operation:
      	1-if(DONE_SC->SCp.phase & check_condition)
                The REQUEST_SENSE command return.
                - Restore original command
      	  - Than continue to operation 3.
      	2-if(DONE_SC->SCp.Status==SAM_STAT_CHECK_CONDITION)
                A regular command returned with a status.
      	  - Internally re-Q a REQUEST_SENSE.
      	  - Do not do operation 3.
      	3-
      	  - Complete the command and return it to scsi-ml
           So the 0x2 in both these operations (1,2) means the scsi
           check-condition status, hence SAM_STAT_CHECK_CONDITION
      
        - Here the code asks about !(DONE_SC->SCp.Status & not_issued)
          but "not_issued" is an enum belonging to the "phase" member
          and not to the Status returned from target. The reason this
          works is because not_issued==1 and Also CHECK_CONDITION==1
          (remember from hunk 1). So actually the code was asking
          !(DONE_SC->SCp.Status & CHECK_CONDITION). Which means
          "Has the status been read from target yet?"
          Staus is read at status_run(). "not_issued" is
          cleared in seldo_run() which is usually earlier than
          status_run().
      
        So this patch does nothing as far as assembly is concerned
        but it does let the reader understand what is going on.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      0ceb4798
    • Boaz Harrosh's avatar
      [SCSI] aha152x: use bounce buffer · b1ee0795
      Boaz Harrosh authored
      Cause highmem buffers to be bounced to low memory until this
      driver supports highmem addresses.  Otherwise it just oopses
      on NULL buffer addresses.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      b1ee0795
    • Boaz Harrosh's avatar
      [SCSI] aha152x: fix debug mode symbol conflict · 50535df3
      Boaz Harrosh authored
      The symbol <debug_locks> conflicts with the rather global one in
      include/linux/locks.h.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      50535df3
    • James Bottomley's avatar
      [SCSI] sd: disentangle barriers in SCSI · 03a5743a
      James Bottomley authored
      Our current implementation has a generic set of barrier functions that
      go through the SCSI driver model.  Realistically, this is unnecessary,
      because the only device that can use barriers (sd) can set the flush
      functions up at probe or revalidate time.  This patch pulls the barrier
      functions out of the mid layer and scsi driver model and relocates them
      directly in sd.
      Acked-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      03a5743a
    • Michael Chan's avatar
      [BNX2]: Fix suspend/resume problem. · 6caebb02
      Michael Chan authored
      The device would not resume properly if it was shutdown before the system
      was suspended.  In such scenario where the netif_running state is 0,
      bnx2_suspend() would not save the PCI state and so the memory enable bit
      and bus master enable bit would be lost.
      
      We fix this by always saving and restoring the PCI state in
      bnx2_suspend() and bnx2_resume() regardless of netif_running() state.
      
      Update version to 1.6.4.
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6caebb02
    • Michael Chan's avatar
      [TG3]: Fix suspend/resume problem. · 3e0c95fd
      Michael Chan authored
      Joachim Deguara <joachim.deguara@amd.com> reported that tg3 devices
      would not resume properly if the device was shutdown before the system
      was suspended.  In such scenario where the netif_running state is 0,
      tg3_suspend() would not save the PCI state and so the memory enable bit
      and bus master enable bit would be lost.
      
      We fix this by always saving and restoring the PCI state in
      tg3_suspend() and tg3_resume() regardless of netif_running() state.
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e0c95fd
    • Linus Torvalds's avatar
      Linux 2.6.23-rc2 · d4ac2477
      Linus Torvalds authored
      d4ac2477
  4. 03 Aug, 2007 21 commits