Re: RFC: ATA to CAM integration patch

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Sat, 27 Jun 2009 19:55:09 +0300
Pieter de Goeje wrote:
> However there is a problem with camcontrol:
> 
> nox# camcontrol devlist
> cam_periph_mapmem: attempt to map 79200 bytes, which is greater than DFLTPHYS(65536)
> camcontrol: error sending CAMIOCOMMAND ioctl: Argument list too long

Thank you for report. I have missed this due to increased DFLTPHYS value 
in my kernel. Attached trivial patch fixes that.

> nox# camcontrol inquiry ada0
> ahcich1: ahci_ch_intr ERROR is 48000000 cs 00000100 ss 00000000 rs 00000100 tfd 451 serr 00000000
> 
> nox# camcontrol inquiry ada1
> ahcich7: ahci_ch_intr ERROR is 40000001 cs 00002000 ss 00000000 rs 00002000 tfd 451 serr 00000000

This is not a problem. ATA disks does not have SCSI INQUIRY command. 
They use own IDENTIFY instead. inquiry should work for ATAPI devices, as 
they are SCSI deep inside.

-- 
Alexander Motin

--- camcontrol.c.prev	2009-06-14 17:29:55.000000000 +0300
+++ camcontrol.c	2009-06-27 19:43:55.000000000 +0300
_at__at_ -321,7 +321,7 _at__at_ getdevtree(void)
 	ccb.ccb_h.target_lun = CAM_LUN_WILDCARD;
 
 	ccb.ccb_h.func_code = XPT_DEV_MATCH;
-	bufsize = sizeof(struct dev_match_result) * 100;
+	bufsize = sizeof(struct dev_match_result) * 50;
 	ccb.cdm.match_buf_len = bufsize;
 	ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize);
 	if (ccb.cdm.matches == NULL) {
Received on Sat Jun 27 2009 - 14:55:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:50 UTC