Date: Sun, 24 Oct 2010 18:53:16 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214288 - head/sys/cam/scsi Message-ID: <201010241853.o9OIrGYn037023@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Oct 24 18:53:16 2010 New Revision: 214288 URL: http://svn.freebsd.org/changeset/base/214288 Log: Make da driver to handle some probably broken Android devices, returning zero media and sector size instead of "Medium not present" error, until some confirmation button is tapped on device. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Oct 24 18:12:11 2010 (r214287) +++ head/sys/cam/scsi/scsi_da.c Sun Oct 24 18:53:16 2010 (r214288) @@ -1667,7 +1667,10 @@ dadone(struct cam_periph *periph, union * give them an 'illegal' value we'll avoid that * here. */ - if (block_size >= MAXPHYS || block_size == 0) { + if (block_size == 0 && maxsector == 0) { + snprintf(announce_buf, sizeof(announce_buf), + "0MB (no media?)"); + } else if (block_size >= MAXPHYS || block_size == 0) { xpt_print(periph->path, "unsupportable block size %ju\n", (uintmax_t) block_size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010241853.o9OIrGYn037023>