Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2001 12:27:32 +0100
From:      j mckitrick <jcm@FreeBSD-uk.eu.org>
To:        freebsd-hackers@freebsd.org, freebsd-scsi@freebsd.org
Subject:   disconnecting from detached zip drive
Message-ID:  <20010612122731.A81226@dogma.freebsd-uk.eu.org>

next in thread | raw e-mail | index | archive | help

hi all,

i'm working on turning the zip driver and all the ppbus devices into
modules.  So far, i have the vpo (zip driver) detaching, but i have problems
when i reattach.

In the initial attach() call, we allocate a tiny bit of memory for a device
controlling microsequence, and we call cam_sim_alloc(), xpt_bus_register(),
and then rescan the bus.  If we fail, we call cam_simq_free() if the
xxx_alloc call failed, and we call cam_sim_free() if xxx_register() fails.

In detach(), i am experimenting (!) and right now i free() the microsequence
(unrelated to cam) and call cam_sim_free().

Here is the problem: when i detach, everything looks fine. I attach() when i
reload the module, and the log message says it is now allocating device vpo0
and vpo1.  There is only supposed to be vpo0, of course.  It also assigns
these as da1 and da2, instead of da0.  Now, when i try to mount the drive, i
get a page fault in cam and/or mount, depending on what i did in detach().

What needs to be done to completely disconnect the zip drive from cam, so
that the new attachment looks like it is starting over from scratch?

Jonathon
--
Tech support:  Try this.  Arrange the parts in neat piles.  Stand on your
chair until you can see over your cubicle walls.  Now shout "Does anybody
know how to read a manual?"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010612122731.A81226>