Date: Fri, 19 Nov 2010 03:47:11 +0000 (UTC) From: Ryan Stone <rstone@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215507 - head/sbin/camcontrol Message-ID: <201011190347.oAJ3lBSx056245@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rstone Date: Fri Nov 19 03:47:10 2010 New Revision: 215507 URL: http://svn.freebsd.org/changeset/base/215507 Log: When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard path id for enumerating the available busses. Previously camcontrol was implicitly passing 0 as the first path id, which meant that if bus 0 was not present camcontrol would fail with EINVAL instead of rescanning/resetting any busses that were present. Approved by: emaste (mentor) MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) bzero(&(&matchccb.ccb_h)[1], sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); matchccb.ccb_h.func_code = XPT_DEV_MATCH; + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; matchccb.cdm.match_buf_len = bufsize; matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011190347.oAJ3lBSx056245>