Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 119196 | Differences between
and this patch

Collapse All | Expand All

(-)old/ppscsi.c (-14 / +14 lines)
Lines 422-437 Link Here
422
422
423
	bf &= (!((1<<pha->cur_cmd->device->id) & pha->slow_targets));
423
	bf &= (!((1<<pha->cur_cmd->device->id) & pha->slow_targets));
424
	
424
	
425
	r = pha->cur_cmd->use_sg;
425
	r = pha->cur_cmd->sdb.table.nents;
426
	if (r) {
426
	if (r) {
427
		b = 0;
427
		b = 0;
428
		p = (struct scatterlist *)pha->cur_cmd->request_buffer;
428
		p = (struct scatterlist *)pha->cur_cmd->sdb.table.sgl;
429
		for (k=0;k<r;k++) {
429
		for (k=0;k<r;k++) {
430
			b += p->length;
430
			b += p->length;
431
			p++;
431
			p++;
432
		}
432
		}
433
	} else { 
433
	} else { 
434
		b = pha->cur_cmd->request_bufflen;
434
		b = pha->cur_cmd->sdb.length;
435
	}
435
	}
436
436
437
	bf &= (b > 127);
437
	bf &= (b > 127);
Lines 565-580 Link Here
565
				pha->data_dir = phase & PPSC_IO;
565
				pha->data_dir = phase & PPSC_IO;
566
				pha->data_count = 0;
566
				pha->data_count = 0;
567
567
568
				pha->sg_count = pha->cur_cmd->use_sg;
568
				pha->sg_count = pha->cur_cmd->sdb.table.nents;
569
				if (pha->sg_count) {
569
				if (pha->sg_count) {
570
					pha->sg_count--;
570
					pha->sg_count--;
571
					pha->sg_list = 
571
					pha->sg_list = 
572
						(struct scatterlist *)pha->cur_cmd->request_buffer;
572
						(struct scatterlist *)pha->cur_cmd->sdb.table.sgl;
573
					pha->cur_buf = sg_virt(pha->sg_list); /* page_address(pha->sg_list->page) + pha->sg_list->offset; */
573
					pha->cur_buf = sg_virt(pha->sg_list); /* page_address(pha->sg_list->page) + pha->sg_list->offset; */
574
					pha->cur_len = pha->sg_list->length;
574
					pha->cur_len = pha->sg_list->length;
575
				} else {
575
				} else {
576
					pha->cur_buf = pha->cur_cmd->request_buffer;
576
					pha->cur_buf = pha->cur_cmd->sdb.table.sgl;
577
					pha->cur_len = pha->cur_cmd->request_bufflen;
577
					pha->cur_len = pha->cur_cmd->sdb.length;
578
				}
578
				}
579
579
580
				pha->last_phase = phase;
580
				pha->last_phase = phase;
Lines 620-626 Link Here
620
620
621
				if (pha->cur_cmd->cmnd[0] == REQUEST_SENSE) {
621
				if (pha->cur_cmd->cmnd[0] == REQUEST_SENSE) {
622
622
623
					sb = (char *)pha->cur_cmd->request_buffer;
623
					sb = (char *)pha->cur_cmd->sdb.table.sgl;
624
					printk("%s: Sense key: %x ASC: %x ASCQ: %x\n",
624
					printk("%s: Sense key: %x ASC: %x ASCQ: %x\n",
625
					       pha->device, sb[2] & 0xff,
625
					       pha->device, sb[2] & 0xff,
626
					       sb[12] & 0xff, sb[13] & 0xff);
626
					       sb[12] & 0xff, sb[13] & 0xff);
Lines 815-823 Link Here
815
		cmd->cmnd[4] = sizeof(cmd->sense_buffer);
815
		cmd->cmnd[4] = sizeof(cmd->sense_buffer);
816
		cmd->cmnd[5] = 0;
816
		cmd->cmnd[5] = 0;
817
		cmd->cmd_len = 6;
817
		cmd->cmd_len = 6;
818
		cmd->use_sg = 0;
818
		cmd->sdb.table.nents = 0;
819
		cmd->request_buffer = (char *) cmd->sense_buffer;
819
		cmd->sdb.table.sgl = (char *) cmd->sense_buffer;
820
		cmd->request_bufflen = sizeof(cmd->sense_buffer);
820
		cmd->sdb.length = sizeof(cmd->sense_buffer);
821
821
822
		pha->cur_cmd = cmd;
822
		pha->cur_cmd = cmd;
823
		ppsc_do_claimed(pha,ppsc_start);
823
		ppsc_do_claimed(pha,ppsc_start);
Lines 1014-1022 Link Here
1014
	cmd.device = &dev;
1014
	cmd.device = &dev;
1015
	cmd.cmd_len = 6;
1015
	cmd.cmd_len = 6;
1016
	for (i=0;i<6;i++) cmd.cmnd[i] = inq[i];
1016
	for (i=0;i<6;i++) cmd.cmnd[i] = inq[i];
1017
	cmd.use_sg = 0;
1017
	cmd.sdb.table.nents = 0;
1018
	cmd.request_buffer = buf;
1018
	cmd.sdb.table.sgl = buf;
1019
	cmd.request_bufflen = 36;
1019
	cmd.sdb.length = 36;
1020
1020
1021
	return ppsc_command(&cmd);
1021
	return ppsc_command(&cmd);
1022
	
1022
	

Return to bug 119196