Re: mpt(4) MPI_EVENT_IR_RESYNC_UPDATE

2010-05-01 Thread Marius Strobl
On Fri, Apr 30, 2010 at 06:50:26PM +0400, pluknet wrote:
 On 30 April 2010 18:22, Matthew Jacob m...@feral.com wrote:
  pluknet wrote:
  Seems good to me- why not trhow it freebsd-scsi? if nobody says no, I'll put
  it in
 
 Err.. I thought that list is dedicated for cam related stuff.
 
 [cc'ing scsi@ for better coverage. Sorry for cross-posting :/ ]
 
 
  --- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c ? ? ? ?2010-03-02
  15:38:13.0 +0300
  +++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c ? 2010-04-21
  19:31:00.0 +0400
  @@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req
  ? ? ? ? ? ? ? ?CAMLOCK_2_MPTLOCK(mpt);
  ? ? ? ? ? ? ? ?break;
  ? ? ? ?}
  + ? ? ? case MPI_EVENT_IR_RESYNC_UPDATE:
  + ? ? ? {
  + ? ? ? ? ? ? ? uint8_t resync = (data0  16)  0xff;
  + ? ? ? ? ? ? ? mpt_prt(mpt, IR resync update %d completed\n, resync);
  + ? ? ? ? ? ? ? break;
  + ? ? ? }
  ? ? ? ?case MPI_EVENT_EVENT_CHANGE:
  ? ? ? ?case MPI_EVENT_INTEGRATED_RAID:
  ? ? ? ?case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
 
  Another way - just hide such event since mptutil displays rebuild
  progress.
 
 
 

Could you maybe avoid defining a variable inside a nested scope for
consistency with the majority of the existing cases and in order to
not violate style(9) unnecessarily?

Marius

Index: mpt_cam.c
===
--- mpt_cam.c   (revision 207463)
+++ mpt_cam.c   (working copy)
@@ -2575,6 +2575,10 @@ mpt_cam_event(struct mpt_softc *mpt, request_t *re
CAMLOCK_2_MPTLOCK(mpt);
break;
}
+   case MPI_EVENT_IR_RESYNC_UPDATE:
+   mpt_prt(mpt, IR resync update %d completed\n,
+   (data0  16)  0xff);
+   break;
case MPI_EVENT_EVENT_CHANGE:
case MPI_EVENT_INTEGRATED_RAID:
case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: mpt(4) MPI_EVENT_IR_RESYNC_UPDATE

2010-05-01 Thread pluknet
On 1 May 2010 19:03, Marius Strobl mar...@alchemy.franken.de wrote:
 On Fri, Apr 30, 2010 at 06:50:26PM +0400, pluknet wrote:
 On 30 April 2010 18:22, Matthew Jacob m...@feral.com wrote:
  pluknet wrote:
  Seems good to me- why not trhow it freebsd-scsi? if nobody says no, I'll 
  put
  it in

 Err.. I thought that list is dedicated for cam related stuff.

 [cc'ing scsi@ for better coverage. Sorry for cross-posting :/ ]

 
  --- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c        2010-03-02
  15:38:13.0 +0300
  +++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c   2010-04-21
  19:31:00.0 +0400
  @@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req
                 CAMLOCK_2_MPTLOCK(mpt);
                 break;
         }
  +       case MPI_EVENT_IR_RESYNC_UPDATE:
  +       {
  +               uint8_t resync = (data0  16)  0xff;
  +               mpt_prt(mpt, IR resync update %d completed\n, resync);
  +               break;
  +       }
         case MPI_EVENT_EVENT_CHANGE:
         case MPI_EVENT_INTEGRATED_RAID:
         case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
 
  Another way - just hide such event since mptutil displays rebuild
  progress.
 
 


 Could you maybe avoid defining a variable inside a nested scope for
 consistency with the majority of the existing cases and in order to
 not violate style(9) unnecessarily?

 Marius

 Index: mpt_cam.c
 ===
 --- mpt_cam.c   (revision 207463)
 +++ mpt_cam.c   (working copy)
 @@ -2575,6 +2575,10 @@ mpt_cam_event(struct mpt_softc *mpt, request_t *re
                CAMLOCK_2_MPTLOCK(mpt);
                break;
        }
 +       case MPI_EVENT_IR_RESYNC_UPDATE:
 +               mpt_prt(mpt, IR resync update %d completed\n,
 +                   (data0  16)  0xff);
 +               break;
        case MPI_EVENT_EVENT_CHANGE:
        case MPI_EVENT_INTEGRATED_RAID:
        case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:


I'm fine with it, resync variable is not necessary there.
Thanks for review.

-- 
wbr,
pluknet
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


mpt(4) MPI_EVENT_IR_RESYNC_UPDATE

2010-04-30 Thread pluknet
Hi,

what do you think of adding this handler (based on old bz@ patch)?
It's quite annoying to see the meaningless messages like
mpt0: Unhandled Event Notify Frame. Event 0x14 (ACK not required).
each 1% change in logical array rebuild progress.

--- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c2010-03-02
15:38:13.0 +0300
+++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c   2010-04-21
19:31:00.0 +0400
@@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req
CAMLOCK_2_MPTLOCK(mpt);
break;
}
+   case MPI_EVENT_IR_RESYNC_UPDATE:
+   {
+   uint8_t resync = (data0  16)  0xff;
+   mpt_prt(mpt, IR resync update %d completed\n, resync);
+   break;
+   }
case MPI_EVENT_EVENT_CHANGE:
case MPI_EVENT_INTEGRATED_RAID:
case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:

Another way - just hide such event since mptutil displays rebuild progress.

-- 
wbr,
pluknet
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: mpt(4) MPI_EVENT_IR_RESYNC_UPDATE

2010-04-30 Thread Matthew Jacob

pluknet wrote:
Seems good to me- why not trhow it freebsd-scsi? if nobody says no, I'll 
put it in



--- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c2010-03-02
15:38:13.0 +0300
+++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c   2010-04-21
19:31:00.0 +0400
@@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req
CAMLOCK_2_MPTLOCK(mpt);
break;
}
+   case MPI_EVENT_IR_RESYNC_UPDATE:
+   {
+   uint8_t resync = (data0  16)  0xff;
+   mpt_prt(mpt, IR resync update %d completed\n, resync);
+   break;
+   }
case MPI_EVENT_EVENT_CHANGE:
case MPI_EVENT_INTEGRATED_RAID:
case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:

Another way - just hide such event since mptutil displays rebuild progress.

  


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: mpt(4) MPI_EVENT_IR_RESYNC_UPDATE

2010-04-30 Thread pluknet
On 30 April 2010 18:22, Matthew Jacob m...@feral.com wrote:
 pluknet wrote:
 Seems good to me- why not trhow it freebsd-scsi? if nobody says no, I'll put
 it in

Err.. I thought that list is dedicated for cam related stuff.

[cc'ing scsi@ for better coverage. Sorry for cross-posting :/ ]


 --- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c        2010-03-02
 15:38:13.0 +0300
 +++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c   2010-04-21
 19:31:00.0 +0400
 @@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req
                CAMLOCK_2_MPTLOCK(mpt);
                break;
        }
 +       case MPI_EVENT_IR_RESYNC_UPDATE:
 +       {
 +               uint8_t resync = (data0  16)  0xff;
 +               mpt_prt(mpt, IR resync update %d completed\n, resync);
 +               break;
 +       }
        case MPI_EVENT_EVENT_CHANGE:
        case MPI_EVENT_INTEGRATED_RAID:
        case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:

 Another way - just hide such event since mptutil displays rebuild
 progress.



-- 
wbr,
pluknet
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org