Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc06cffd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
  [SCSI] ibmvscsi: convert to use the data buffer accessors
  [SCSI] dc395x: convert to use the data buffer accessors
  [SCSI] ncr53c8xx: convert to use the data buffer accessors
  [SCSI] sym53c8xx: convert to use the data buffer accessors
  [SCSI] ppa: coding police and printk levels
  [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
  [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
  [SCSI] remove the dead CYBERSTORMIII_SCSI option
  [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
  [SCSI] Clean up scsi_add_lun a bit
  [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
  [SCSI] sni_53c710: Cleanup
  [SCSI] qla4xxx: Fix underrun/overrun conditions
  [SCSI] megaraid_mbox: use mutex instead of semaphore
  [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
  [SCSI] qla2xxx: update version to 8.02.00-k1.
  [SCSI] qla2xxx: add support for NPIV
  [SCSI] stex: use resid for xfer len information
  [SCSI] Add Brownie 1200U3P to blacklist
  [SCSI] scsi.c: convert to use the data buffer accessors
  ...
parents d3502d7f 9413d7b8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ Supported Cards/Chipsets
	9005:0285:9005:02be	Adaptec	31605 (Marauder160)
	9005:0285:9005:02c3	Adaptec	51205 (Voodoo120)
	9005:0285:9005:02c4	Adaptec	51605 (Voodoo160)
	9005:0285:9005:02ce	Adaptec	51245 (Voodoo124)
	9005:0285:9005:02cf	Adaptec	51645 (Voodoo164)
	9005:0285:9005:02d0	Adaptec	52445 (Voodoo244)
	1011:0046:9005:0364	Adaptec	5400S (Mustang)
	9005:0287:9005:0800	Adaptec	Themisto (Jupiter)
	9005:0200:9005:0200	Adaptec	Themisto (Jupiter)
+450 −0

File added.

Preview size limit exceeded, changes collapsed.

+22 −53
Original line number Diff line number Diff line
@@ -555,7 +555,6 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
{
	struct scsi_cmnd *cmd;
	ctlr_info_t *ctlr;
	u64bit addr64;
	ErrorInfo_struct *ei;

	ei = cp->err_info;
@@ -569,20 +568,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
	cmd = (struct scsi_cmnd *) cp->scsi_cmd;	
	ctlr = hba[cp->ctlr];

	/* undo the DMA mappings */

	if (cmd->use_sg) {
		pci_unmap_sg(ctlr->pdev,
			cmd->request_buffer, cmd->use_sg,
				cmd->sc_data_direction); 
	}
	else if (cmd->request_bufflen) {
		addr64.val32.lower = cp->SG[0].Addr.lower;
                addr64.val32.upper = cp->SG[0].Addr.upper;
                pci_unmap_single(ctlr->pdev, (dma_addr_t) addr64.val,
                	cmd->request_bufflen, 
				cmd->sc_data_direction);
	}
	scsi_dma_unmap(cmd);

	cmd->result = (DID_OK << 16); 		/* host byte */
	cmd->result |= (COMMAND_COMPLETE << 8);	/* msg byte */
@@ -597,7 +583,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
		ei->SenseLen > SCSI_SENSE_BUFFERSIZE ?
			SCSI_SENSE_BUFFERSIZE : 
			ei->SenseLen);
	cmd->resid = ei->ResidualCnt;
	scsi_set_resid(cmd, ei->ResidualCnt);

	if(ei->CommandStatus != 0) 
	{ /* an error has occurred */ 
@@ -1204,46 +1190,29 @@ cciss_scatter_gather(struct pci_dev *pdev,
		CommandList_struct *cp,	
		struct scsi_cmnd *cmd)
{
	unsigned int use_sg, nsegs=0, len;
	struct scatterlist *scatter = (struct scatterlist *) cmd->request_buffer;
	unsigned int len;
	struct scatterlist *sg;
	__u64 addr64;
	int use_sg, i;

	/* is it just one virtual address? */	
	if (!cmd->use_sg) {
		if (cmd->request_bufflen) {	/* anything to xfer? */
	BUG_ON(scsi_sg_count(cmd) > MAXSGENTRIES);

			addr64 = (__u64) pci_map_single(pdev, 
				cmd->request_buffer, 
				cmd->request_bufflen, 
				cmd->sc_data_direction); 
	
			cp->SG[0].Addr.lower = 
	use_sg = scsi_dma_map(cmd);
	if (use_sg) {	/* not too many addrs? */
		scsi_for_each_sg(cmd, sg, use_sg, i) {
			addr64 = (__u64) sg_dma_address(sg);
			len  = sg_dma_len(sg);
			cp->SG[i].Addr.lower =
				(__u32) (addr64 & (__u64) 0x00000000FFFFFFFF);
			cp->SG[0].Addr.upper =
			cp->SG[i].Addr.upper =
				(__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF);
			cp->SG[0].Len = cmd->request_bufflen;
			nsegs=1;
			cp->SG[i].Len = len;
			cp->SG[i].Ext = 0;  // we are not chaining
		}
	} /* else, must be a list of virtual addresses.... */
	else if (cmd->use_sg <= MAXSGENTRIES) {	/* not too many addrs? */

		use_sg = pci_map_sg(pdev, cmd->request_buffer, cmd->use_sg,
			cmd->sc_data_direction);

		for (nsegs=0; nsegs < use_sg; nsegs++) {
			addr64 = (__u64) sg_dma_address(&scatter[nsegs]);
			len  = sg_dma_len(&scatter[nsegs]);
			cp->SG[nsegs].Addr.lower =
			  (__u32) (addr64 & (__u64) 0x00000000FFFFFFFF);
			cp->SG[nsegs].Addr.upper =
			  (__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF);
			cp->SG[nsegs].Len = len;
			cp->SG[nsegs].Ext = 0;  // we are not chaining
	}
	} else BUG();

	cp->Header.SGList = (__u8) nsegs;   /* no. SGs contig in this cmd */
	cp->Header.SGTotal = (__u16) nsegs; /* total sgs in this cmd list */
	cp->Header.SGList = (__u8) use_sg;   /* no. SGs contig in this cmd */
	cp->Header.SGTotal = (__u16) use_sg; /* total sgs in this cmd list */
	return;
}

+4 −71

File changed.

Preview size limit exceeded, changes collapsed.

+26 −14

File changed.

Preview size limit exceeded, changes collapsed.

Loading