2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Written by: David Jeffery
5 * Copyright (c) 2002 Adaptec Inc.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
33 #include <sys/types.h>
35 #include <sys/mutex.h>
39 #include <dev/ips/ipsreg.h>
40 #include <dev/ips/ips.h>
42 static d_open_t ips_open;
43 static d_close_t ips_close;
44 static d_ioctl_t ips_ioctl;
46 MALLOC_DEFINE(M_IPSBUF, "ipsbuf","IPS driver buffer");
48 static struct cdevsw ips_cdevsw = {
49 .d_version = D_VERSION,
56 static const char* ips_adapter_name[] = {
58 "ServeRAID (copperhead)",
59 "ServeRAID II (copperhead refresh)",
60 "ServeRAID onboard (copperhead)",
61 "ServeRAID onboard (copperhead)",
62 "ServeRAID 3H (clarinet)",
63 "ServeRAID 3L (clarinet lite)",
64 "ServeRAID 4H (trombone)",
65 "ServeRAID 4M (morpheus)",
66 "ServeRAID 4L (morpheus lite)",
67 "ServeRAID 4Mx (neo)",
68 "ServeRAID 4Lx (neo lite)",
69 "ServeRAID 5i II (sarasota)",
70 "ServeRAID 5i (sarasota)",
71 "ServeRAID 6M (marco)",
72 "ServeRAID 6i (sebring)",
79 static int ips_open(struct cdev *dev, int flags, int fmt, struct thread *td)
81 ips_softc_t *sc = dev->si_drv1;
82 mtx_lock(&sc->queue_mtx);
83 sc->state |= IPS_DEV_OPEN;
84 mtx_unlock(&sc->queue_mtx);
88 static int ips_close(struct cdev *dev, int flags, int fmt, struct thread *td)
90 ips_softc_t *sc = dev->si_drv1;
92 mtx_lock(&sc->queue_mtx);
93 sc->state &= ~IPS_DEV_OPEN;
94 mtx_unlock(&sc->queue_mtx);
99 static int ips_ioctl(struct cdev *dev, u_long command, caddr_t addr, int32_t flags, struct thread *td)
104 return ips_ioctl_request(sc, command, addr, flags);
107 static void ips_cmd_dmaload(void *cmdptr, bus_dma_segment_t *segments,int segnum, int error)
109 ips_command_t *command = cmdptr;
110 PRINTF(10, "ips: in ips_cmd_dmaload\n");
112 command->command_phys_addr = segments[0].ds_addr;
116 /* is locking needed? what locking guarantees are there on removal? */
117 static int ips_cmdqueue_free(ips_softc_t *sc)
120 ips_command_t *command;
122 if(!sc->used_commands){
123 for(i = 0; i < sc->max_cmds; i++){
125 command = &sc->commandarray[i];
127 if(command->command_phys_addr == 0)
129 bus_dmamap_unload(sc->command_dmatag,
130 command->command_dmamap);
131 bus_dmamem_free(sc->command_dmatag,
132 command->command_buffer,
133 command->command_dmamap);
134 if (command->data_dmamap != NULL)
135 bus_dmamap_destroy(command->data_dmatag,
136 command->data_dmamap);
139 sc->state |= IPS_OFFLINE;
141 sc->staticcmd = NULL;
142 free(sc->commandarray, M_DEVBUF);
146 /* places all ips command structs on the free command queue. No locking as if someone else tries
147 * to access this during init, we have bigger problems */
148 static int ips_cmdqueue_init(ips_softc_t *sc)
151 ips_command_t *command;
153 sc->commandarray = (ips_command_t *)malloc(sizeof(ips_command_t) *
154 sc->max_cmds, M_DEVBUF, M_NOWAIT|M_ZERO);
155 if (sc->commandarray == NULL)
158 SLIST_INIT(&sc->free_cmd_list);
159 for(i = 0; i < sc->max_cmds; i++){
160 command = &sc->commandarray[i];
164 if(bus_dmamem_alloc(sc->command_dmatag,&command->command_buffer,
165 BUS_DMA_NOWAIT, &command->command_dmamap))
167 bus_dmamap_load(sc->command_dmatag, command->command_dmamap,
168 command->command_buffer,IPS_COMMAND_LEN,
169 ips_cmd_dmaload, command, BUS_DMA_NOWAIT);
170 if(!command->command_phys_addr){
171 bus_dmamem_free(sc->command_dmatag,
172 command->command_buffer, command->command_dmamap);
177 command->data_dmatag = sc->sg_dmatag;
178 if (bus_dmamap_create(command->data_dmatag, 0,
179 &command->data_dmamap))
181 SLIST_INSERT_HEAD(&sc->free_cmd_list, command, next);
183 sc->staticcmd = command;
185 sc->state &= ~IPS_OFFLINE;
188 ips_cmdqueue_free(sc);
192 /* returns a free command struct if one is available.
193 * It also blanks out anything that may be a wild pointer/value.
194 * Also, command buffers are not freed. They are
195 * small so they are saved and kept dmamapped and loaded.
197 int ips_get_free_cmd(ips_softc_t *sc, ips_command_t **cmd, unsigned long flags)
199 ips_command_t *command;
201 if(sc->state & IPS_OFFLINE){
204 if ((flags & IPS_STATIC_FLAG) == 0) {
205 command = SLIST_FIRST(&sc->free_cmd_list);
206 if(!command || (sc->state & IPS_TIMEOUT)){
209 SLIST_REMOVE_HEAD(&sc->free_cmd_list, next);
210 (sc->used_commands)++;
212 if (sc->state & IPS_STATIC_BUSY)
214 command = sc->staticcmd;
215 sc->state |= IPS_STATIC_BUSY;
217 clear_ips_command(command);
218 bzero(command->command_buffer, IPS_COMMAND_LEN);
223 /* adds a command back to the free command queue */
224 void ips_insert_free_cmd(ips_softc_t *sc, ips_command_t *command)
227 if (sema_value(&sc->cmd_sema) != 0)
228 panic("ips: command returned non-zero semaphore");
230 if (command != sc->staticcmd) {
231 SLIST_INSERT_HEAD(&sc->free_cmd_list, command, next);
232 (sc->used_commands)--;
234 sc->state &= ~IPS_STATIC_BUSY;
237 static const char* ips_diskdev_statename(u_int8_t state)
239 static char statebuf[20];
247 case IPS_LD_DEGRADED:
260 sprintf(statebuf,"UNKNOWN(0x%02x)", state);
264 static int ips_diskdev_init(ips_softc_t *sc)
267 for(i=0; i < IPS_MAX_NUM_DRIVES; i++){
268 if(sc->drives[i].state == IPS_LD_FREE) continue;
269 device_printf(sc->dev, "Logical Drive %d: RAID%d sectors: %u, state %s\n",
270 i, sc->drives[i].raid_lvl,
271 sc->drives[i].sector_count,
272 ips_diskdev_statename(sc->drives[i].state));
273 if(sc->drives[i].state == IPS_LD_OKAY ||
274 sc->drives[i].state == IPS_LD_DEGRADED){
275 sc->diskdev[i] = device_add_child(sc->dev, NULL, -1);
276 device_set_ivars(sc->diskdev[i],(void *)(uintptr_t) i);
279 if(bus_generic_attach(sc->dev)){
280 device_printf(sc->dev, "Attaching bus failed\n");
285 static int ips_diskdev_free(ips_softc_t *sc)
289 for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){
291 error = device_delete_child(sc->dev, sc->diskdev[i]);
296 bus_generic_detach(sc->dev);
300 /* ips_timeout is periodically called to make sure no commands sent
301 * to the card have become stuck. If it finds a stuck command, it
302 * sets a flag so the driver won't start any more commands and then
303 * is periodically called to see if all outstanding commands have
304 * either finished or timed out. Once timed out, an attempt to
305 * reinitialize the card is made. If that fails, the driver gives
306 * up and declares the card dead. */
307 static void ips_timeout(void *arg)
309 ips_softc_t *sc = arg;
311 ips_command_t *command;
313 mtx_assert(&sc->queue_mtx, MA_OWNED);
314 command = &sc->commandarray[0];
315 for(i = 0; i < sc->max_cmds; i++){
316 if(!command[i].timeout){
319 command[i].timeout--;
320 if(!command[i].timeout){
321 if(!(sc->state & IPS_TIMEOUT)){
322 sc->state |= IPS_TIMEOUT;
323 device_printf(sc->dev, "WARNING: command timeout. Adapter is in toaster mode, resetting to known state\n");
325 ips_set_error(&command[i], ETIMEDOUT);
326 command[i].callback(&command[i]);
327 /* hmm, this should be enough cleanup */
331 if(!state && (sc->state & IPS_TIMEOUT)){
332 if(sc->ips_adapter_reinit(sc, 1)){
333 device_printf(sc->dev, "AIEE! adapter reset failed, giving up and going home! Have a nice day.\n");
334 sc->state |= IPS_OFFLINE;
335 sc->state &= ~IPS_TIMEOUT;
336 /* Grr, I hate this solution. I run waiting commands
337 one at a time and error them out just before they
338 would go to the card. This sucks. */
340 sc->state &= ~IPS_TIMEOUT;
342 if (sc->state != IPS_OFFLINE)
343 callout_reset(&sc->timer, 10 * hz, ips_timeout, sc);
346 /* check card and initialize it */
347 int ips_adapter_init(ips_softc_t *sc)
350 DEVICE_PRINTF(1,sc->dev, "initializing\n");
352 if (bus_dma_tag_create( /* parent */ sc->adapter_dmatag,
355 /* lowaddr */ BUS_SPACE_MAXADDR_32BIT,
356 /* highaddr */ BUS_SPACE_MAXADDR,
358 /* filterarg */ NULL,
359 /* maxsize */ IPS_COMMAND_LEN +
362 /* maxsegsize*/ IPS_COMMAND_LEN +
367 &sc->command_dmatag) != 0) {
368 device_printf(sc->dev, "can't alloc command dma tag\n");
371 if (bus_dma_tag_create( /* parent */ sc->adapter_dmatag,
374 /* lowaddr */ BUS_SPACE_MAXADDR_32BIT,
375 /* highaddr */ BUS_SPACE_MAXADDR,
377 /* filterarg */ NULL,
378 /* maxsize */ IPS_MAX_IOBUF_SIZE,
379 /* numsegs */ IPS_MAX_SG_ELEMENTS,
380 /* maxsegsize*/ IPS_MAX_IOBUF_SIZE,
382 /* lockfunc */ busdma_lock_mutex,
383 /* lockarg */ &sc->queue_mtx,
384 &sc->sg_dmatag) != 0) {
385 device_printf(sc->dev, "can't alloc SG dma tag\n");
388 /* create one command buffer until we know how many commands this card
391 ips_cmdqueue_init(sc);
393 if(sc->ips_adapter_reinit(sc, 0))
396 /* initialize ffdc values */
397 microtime(&sc->ffdc_resettime);
398 sc->ffdc_resetcount = 1;
399 if ((i = ips_ffdc_reset(sc)) != 0) {
400 device_printf(sc->dev, "failed to send ffdc reset to device (%d)\n", i);
403 if ((i = ips_get_adapter_info(sc)) != 0) {
404 device_printf(sc->dev, "failed to get adapter configuration data from device (%d)\n", i);
407 ips_update_nvram(sc); /* no error check as failure doesn't matter */
408 if(sc->adapter_type > 0 && sc->adapter_type <= IPS_ADAPTER_MAX_T){
409 device_printf(sc->dev, "adapter type: %s\n", ips_adapter_name[sc->adapter_type]);
411 if ((i = ips_get_drive_info(sc)) != 0) {
412 device_printf(sc->dev, "failed to get drive configuration data from device (%d)\n", i);
416 ips_cmdqueue_free(sc);
417 if(sc->adapter_info.max_concurrent_cmds)
418 sc->max_cmds = min(128, sc->adapter_info.max_concurrent_cmds);
421 if(ips_cmdqueue_init(sc)){
422 device_printf(sc->dev, "failed to initialize command buffers\n");
425 sc->device_file = make_dev(&ips_cdevsw, device_get_unit(sc->dev), UID_ROOT, GID_OPERATOR,
426 S_IRUSR | S_IWUSR, "ips%d", device_get_unit(sc->dev));
427 sc->device_file->si_drv1 = sc;
428 ips_diskdev_init(sc);
429 callout_reset(&sc->timer, 10 * hz, ips_timeout, sc);
433 ips_adapter_free(sc);
437 /* see if we should reinitialize the card and wait for it to timeout or complete initialization */
438 int ips_morpheus_reinit(ips_softc_t *sc, int force)
443 tmp = ips_read_4(sc, MORPHEUS_REG_OISR);
444 if(!force && (ips_read_4(sc, MORPHEUS_REG_OMR0) >= IPS_POST1_OK) &&
445 (ips_read_4(sc, MORPHEUS_REG_OMR1) != 0xdeadbeef) && !tmp){
446 ips_write_4(sc, MORPHEUS_REG_OIMR, 0);
449 ips_write_4(sc, MORPHEUS_REG_OIMR, 0xff);
450 ips_read_4(sc, MORPHEUS_REG_OIMR);
452 device_printf(sc->dev, "resetting adapter, this may take up to 5 minutes\n");
453 ips_write_4(sc, MORPHEUS_REG_IDR, 0x80000000);
455 ips_read_4(sc, MORPHEUS_REG_OIMR);
457 tmp = ips_read_4(sc, MORPHEUS_REG_OISR);
458 for(i = 0; i < 45 && !(tmp & MORPHEUS_BIT_POST1); i++){
460 DEVICE_PRINTF(2, sc->dev, "post1: %d\n", i);
461 tmp = ips_read_4(sc, MORPHEUS_REG_OISR);
463 if(tmp & MORPHEUS_BIT_POST1)
464 ips_write_4(sc, MORPHEUS_REG_OISR, MORPHEUS_BIT_POST1);
466 if( i == 45 || ips_read_4(sc, MORPHEUS_REG_OMR0) < IPS_POST1_OK){
467 device_printf(sc->dev,"Adapter error during initialization.\n");
470 for(i = 0; i < 240 && !(tmp & MORPHEUS_BIT_POST2); i++){
472 DEVICE_PRINTF(2, sc->dev, "post2: %d\n", i);
473 tmp = ips_read_4(sc, MORPHEUS_REG_OISR);
475 if(tmp & MORPHEUS_BIT_POST2)
476 ips_write_4(sc, MORPHEUS_REG_OISR, MORPHEUS_BIT_POST2);
478 if(i == 240 || !ips_read_4(sc, MORPHEUS_REG_OMR1)){
479 device_printf(sc->dev, "adapter failed config check\n");
482 ips_write_4(sc, MORPHEUS_REG_OIMR, 0);
483 if(force && ips_clear_adapter(sc)){
484 device_printf(sc->dev, "adapter clear failed\n");
490 /* clean up so we can unload the driver. */
491 int ips_adapter_free(ips_softc_t *sc)
494 if(sc->state & IPS_DEV_OPEN)
496 if((error = ips_diskdev_free(sc)))
498 if(ips_cmdqueue_free(sc)){
499 device_printf(sc->dev,
500 "trying to exit when command queue is not empty!\n");
503 DEVICE_PRINTF(1, sc->dev, "free\n");
504 callout_drain(&sc->timer);
507 bus_dma_tag_destroy(sc->sg_dmatag);
508 if(sc->command_dmatag)
509 bus_dma_tag_destroy(sc->command_dmatag);
511 destroy_dev(sc->device_file);
515 static __inline int ips_morpheus_check_intr(ips_softc_t *sc)
518 ips_cmd_status_t status;
519 ips_command_t *command;
523 oisr = ips_read_4(sc, MORPHEUS_REG_OISR);
524 PRINTF(9, "interrupt registers out:%x\n", oisr);
525 if(!(oisr & MORPHEUS_BIT_CMD_IRQ)){
526 DEVICE_PRINTF(2,sc->dev, "got a non-command irq\n");
529 while((status.value = ips_read_4(sc, MORPHEUS_REG_OQPR)) != 0xffffffff){
530 cmdnumber = status.fields.command_id;
531 command = &sc->commandarray[cmdnumber];
532 command->status.value = status.value;
533 command->timeout = 0;
534 command->callback(command);
541 void ips_morpheus_intr(void *void_sc)
543 ips_softc_t *sc = void_sc;
545 mtx_lock(&sc->queue_mtx);
546 ips_morpheus_check_intr(sc);
547 mtx_unlock(&sc->queue_mtx);
550 void ips_morpheus_poll(ips_command_t *command)
555 * Locks are not used here because this is only called during
558 ts = time_second + command->timeout;
559 while ((command->timeout != 0)
560 && (ips_morpheus_check_intr(command->sc) == 0)
561 && (ts > time_second))
565 void ips_issue_morpheus_cmd(ips_command_t *command)
567 /* hmmm, is there a cleaner way to do this? */
568 if(command->sc->state & IPS_OFFLINE){
569 ips_set_error(command, EINVAL);
570 command->callback(command);
573 command->timeout = 10;
574 ips_write_4(command->sc, MORPHEUS_REG_IQPR, command->command_phys_addr);
577 static void ips_copperhead_queue_callback(void *queueptr, bus_dma_segment_t *segments,int segnum, int error)
579 ips_copper_queue_t *queue = queueptr;
583 queue->base_phys_addr = segments[0].ds_addr;
586 static int ips_copperhead_queue_init(ips_softc_t *sc)
589 bus_dma_tag_t dmatag;
591 if (bus_dma_tag_create( /* parent */ sc->adapter_dmatag,
594 /* lowaddr */ BUS_SPACE_MAXADDR_32BIT,
595 /* highaddr */ BUS_SPACE_MAXADDR,
597 /* filterarg */ NULL,
598 /* maxsize */ sizeof(ips_copper_queue_t),
600 /* maxsegsize*/ sizeof(ips_copper_queue_t),
605 device_printf(sc->dev, "can't alloc dma tag for statue queue\n");
609 if(bus_dmamem_alloc(dmatag, (void *)&(sc->copper_queue),
610 BUS_DMA_NOWAIT, &dmamap)){
614 bzero(sc->copper_queue, sizeof(ips_copper_queue_t));
615 sc->copper_queue->dmatag = dmatag;
616 sc->copper_queue->dmamap = dmamap;
617 sc->copper_queue->nextstatus = 1;
618 bus_dmamap_load(dmatag, dmamap,
619 &(sc->copper_queue->status[0]), IPS_MAX_CMD_NUM * 4,
620 ips_copperhead_queue_callback, sc->copper_queue,
622 if(sc->copper_queue->base_phys_addr == 0){
626 ips_write_4(sc, COPPER_REG_SQSR, sc->copper_queue->base_phys_addr);
627 ips_write_4(sc, COPPER_REG_SQER, sc->copper_queue->base_phys_addr +
628 IPS_MAX_CMD_NUM * 4);
629 ips_write_4(sc, COPPER_REG_SQHR, sc->copper_queue->base_phys_addr + 4);
630 ips_write_4(sc, COPPER_REG_SQTR, sc->copper_queue->base_phys_addr);
635 if (sc->copper_queue != NULL)
636 bus_dmamem_free(dmatag, sc->copper_queue, dmamap);
637 bus_dma_tag_destroy(dmatag);
641 /* see if we should reinitialize the card and wait for it to timeout or complete initialization FIXME */
642 int ips_copperhead_reinit(ips_softc_t *sc, int force)
645 u_int32_t postcode = 0, configstatus = 0;
646 ips_write_1(sc, COPPER_REG_SCPR, 0x80);
647 ips_write_1(sc, COPPER_REG_SCPR, 0);
648 device_printf(sc->dev, "reinitializing adapter, this could take several minutes.\n");
649 for(j = 0; j < 2; j++){
651 for(i = 0; i < 45; i++){
652 if(ips_read_1(sc, COPPER_REG_HISR) & COPPER_GHI_BIT){
653 postcode |= ips_read_1(sc, COPPER_REG_ISPR);
654 ips_write_1(sc, COPPER_REG_HISR,
663 for(j = 0; j < 2; j++){
665 for(i = 0; i < 240; i++){
666 if(ips_read_1(sc, COPPER_REG_HISR) & COPPER_GHI_BIT){
667 configstatus |= ips_read_1(sc, COPPER_REG_ISPR);
668 ips_write_1(sc, COPPER_REG_HISR,
677 for(i = 0; i < 240; i++){
678 if(!(ips_read_1(sc, COPPER_REG_CBSP) & COPPER_OP_BIT)){
685 ips_write_2(sc, COPPER_REG_CCCR, 0x1000 | COPPER_ILE_BIT);
686 ips_write_1(sc, COPPER_REG_SCPR, COPPER_EBM_BIT);
687 ips_copperhead_queue_init(sc);
688 ips_write_1(sc, COPPER_REG_HISR, COPPER_GHI_BIT);
689 i = ips_read_1(sc, COPPER_REG_SCPR);
690 ips_write_1(sc, COPPER_REG_HISR, COPPER_EI_BIT);
692 device_printf(sc->dev, "adapter initialization failed\n");
695 if(force && ips_clear_adapter(sc)){
696 device_printf(sc->dev, "adapter clear failed\n");
701 static u_int32_t ips_copperhead_cmd_status(ips_softc_t *sc)
704 int statnum = sc->copper_queue->nextstatus++;
705 if(sc->copper_queue->nextstatus == IPS_MAX_CMD_NUM)
706 sc->copper_queue->nextstatus = 0;
707 value = sc->copper_queue->status[statnum];
708 ips_write_4(sc, COPPER_REG_SQTR, sc->copper_queue->base_phys_addr +
714 void ips_copperhead_intr(void *void_sc)
716 ips_softc_t *sc = (ips_softc_t *)void_sc;
718 ips_cmd_status_t status;
720 mtx_lock(&sc->queue_mtx);
721 while(ips_read_1(sc, COPPER_REG_HISR) & COPPER_SCE_BIT){
722 status.value = ips_copperhead_cmd_status(sc);
723 cmdnumber = status.fields.command_id;
724 sc->commandarray[cmdnumber].status.value = status.value;
725 sc->commandarray[cmdnumber].timeout = 0;
726 sc->commandarray[cmdnumber].callback(&(sc->commandarray[cmdnumber]));
727 PRINTF(9, "ips: got command %d\n", cmdnumber);
729 mtx_unlock(&sc->queue_mtx);
733 void ips_issue_copperhead_cmd(ips_command_t *command)
736 /* hmmm, is there a cleaner way to do this? */
737 if(command->sc->state & IPS_OFFLINE){
738 ips_set_error(command, EINVAL);
739 command->callback(command);
742 command->timeout = 10;
743 for(i = 0; ips_read_4(command->sc, COPPER_REG_CCCR) & COPPER_SEM_BIT;
746 printf("sem bit still set, can't send a command\n");
749 DELAY(500);/* need to do a delay here */
751 ips_write_4(command->sc, COPPER_REG_CCSAR, command->command_phys_addr);
752 ips_write_2(command->sc, COPPER_REG_CCCR, COPPER_CMD_START);
755 void ips_copperhead_poll(ips_command_t *command)
758 printf("ips: cmd polling not implemented for copperhead devices\n");