Thread (5 messages) flat view 5 messages, 4 authors, 2012-09-10

RE: [PATCH][v3] sata_fsl: add workaround for data length mismatch on freescale V2 controller

From: Xie Shaohui-B21989 <hidden>
Date: 2012-09-10 02:53:53
Also in: linux-ide, lkml

quoted
+	/* Workaround for data length mismatch errata */
+	if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
+		for (tag =3D 0; tag < ATA_MAX_QUEUE; tag++) {
+			qc =3D ata_qc_from_tag(ap, tag);
+			if (qc && ata_is_atapi(qc->tf.protocol)) {
+				u32 hcontrol;
+#define HCONTROL_CLEAR_ERROR	(1 << 27)
=20
shouldn't we have this #define be part of the enum that the other
HCONTROL_ bits/flags are part of?
[S.H] do you mean this?

#ifdef SATA_FSL_XXX_ERRATUAM
#define HCONTROL_CLEAR_ERROR	(1 << 27)
#endif

Then we need to decide where to put "#define SATA_FSL_XXX_ERRATUAM".

It's only a readable definition of a register bit which avoiding magic numb=
er.


Best Regards,=20
Shaohui Xie
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help